#programmers-off-topic

1 messages · Page 6 of 1

sand frost
#

that and lack of variable typing are the two reasons I would recommend someone learn C# or Java or something else

thin estuary
#

i'll just stick to C#/Swift/Kotlin

sand frost
#

it makes a readable sentence!

safe dragon
#

I'll make em learn haskell first and see who remains

sand frost
#

hmmmmmmmm

safe dragon
#

gotta weed out the weak

sand frost
#

I would not have learned to program if I started in Haskell

pliant snow
#

It took me a minute to realize where there's so many C# programmers here lol

safe dragon
#

neither would I have

marble jewel
#

Programming in a few years is just going to be your native (spoken) language compiled directly to machine code

pliant snow
#

i dont hear much about C#, until I come in here

sand frost
#

I'm not really convinced I learned Haskell at all, and I knew at least two other languages first

#

such a mystery, aquo SDVpuffersquee

safe dragon
#

I did all 25 days of advent of code 2022 in haskell and I still feel like I barely understand its basic function operators

thin estuary
#

fwiw, i don't exactly like C#, but it does its job and makes for moddable games

safe dragon
#

I like modern C# but it's got a lot of baggage

pliant snow
#

Is it better or worse than the Lua ternary

safe dragon
#

do they put it at the end

sand frost
#

I like C# better than Java, and I don't know enough nice OOP type languages to speak confidently

thin estuary
#

oh no, not the Lua "ternary"

sand frost
#

Like, i also wouldn't start someone out in Javascript

thin estuary
#

i still prefer Lua's one i think

sand frost
#

they should learn something before they learn crimes

pliant snow
#
local bar = foo and 1 or 0
safe dragon
#

what

sand frost
#

that's incomprehensible

pliant snow
#

That's Lua™️

safe dragon
#

oh I've seen that garbage in javascript before

sand frost
#

I've heard people use TypeScript or Julia or such in intro classes

#

But I don't know either of those

thin estuary
#

have fun if you want to return a falsish value if the condition is true

safe dragon
#

local bar = foo and false or true

sand frost
#

I also don't know C or C++, my impression is that they're good languages to know but perhaps a little terrifying as intros

frosty echo
safe dragon
#

you can indeed

pliant snow
#

I can work in a C/C++ codebase fine, but if I had to actually start a new project, I'd have to look up some stuff lol

safe dragon
#

javascript does have an actual genuine ternary operator though

marble jewel
#

The good thing about learning C/C++ is it forces you to learn more about how the code sits on top of the hardware. It's easy to disconnect from concepts like memory in C#.

safe dragon
#

hell C# sometimes makes it difficult to even still know what's going on with the memory

thin estuary
wild swan
safe dragon
#

ternary operators are quite useful I think and easily readable

wild swan
#

they are, best not to overuse them though

safe dragon
#

gotta save those precious lines...

marble jewel
#

Best not to overly nest them

safe dragon
#

I never ever nest ternary operators

#

at that point I rewrite

wild swan
#

null coalescing is a neat alternative

#

if possible

safe dragon
#

in an ideal world we wouldn't have null hc_pensive

#

all languages would've settled on an Option or Result type

#

and we'd be happier

#

ok haskell can keep its Maybe instead of Option

sand frost
#

Honestly I am not convinced my teacher was wrong to start us out in Lisp

pliant snow
#

Lisp is a path to things the Jedi would consider... unnatural

safe dragon
#

I should probably try a lisp even though I find it very ugly

cinder karma
#

No automatic smid

safe dragon
#

love rust's memory management solution but definitely understand why most languages stay away from it

marble jewel
#

You're able to pay attention to it, but most people can and do ignore it

pliant snow
#

It's okay, when Nim transcends to it's rightful place, we all can live in harmony

safe dragon
#

I'm still praying that I will wake up someday though and see a new blog from the dotnet team talking about how they managed to rewrite the LINQ functions to be allocation free and essentially be unrolled into an optimized loop like they are in rust...

#

I don't expect this to happen

#

but it'd be nice

#

all our C# applications are a bit of a memory usage nightmare tbh

#

they all use an unreasonable amount of memory

fossil hinge
#

I had to write some code to grab the SDL2 version out of a running process

#
sdl_get_version_addr = Module.findExportByName('libSDL2-2.0.0.dylib', 'SDL_GetVersion')
sdL_version_memory = Memory.alloc(3)
var sdl_version = new NativePointer(sdL_version_memory)
var sdl_get_version_call = new NativeFunction(sdl_get_version_addr, 'void', ['pointer']
)

sdl_get_version_call(sdL_version_memory)
console.log(Memory.readU8(sdl_version)+'.'+Memory.readU8(sdl_version.add(1))+'.'+Memory.readU8(sdl_version.add(2)))
#

Stardew uses 2.0.14 of SDL2

#

I've seen 2.0.18 launch without issues

thin estuary
#

this isn't a Stardew channel though

fossil hinge
#

Whatever I'll move over there

pliant snow
#

I think this channel would still apply

cinder karma
#

In a real way I feel like the rust compiler has my back

#

While in c# I feel naked and alone trying to thread

safe dragon
#

and for Javascript I feel like someone's actively trying to sabotage me

marble jewel
#

Objectively, HTML5 is the best programming language https://youtu.be/mkpR1OtUwP0?si=kq9KGWAZg2kOYXw0

Use code EASTER25 for 25% off any course, EASTER15 for 15% off any bundle or EASTER10 for 10 off your first year of Dometrain Pro on Dometrain: https://dometrain.com

Become a Patreon and get special perks: https://www.patreon.com/nickchapsas

Hello, everybody, I'm Nick, and in this video, I will rank every programming language ever in an object...

▶ Play video
safe dragon
#

I do honestly like html5

#

mostly because it really doesn't need to do that much

#

glad he shills his courses even in the april fools video lmao

ivory shadow
#

Matt don't make me come over there

#

lol

lethal walrus
ivory shadow
#

(As to not polute #making-mods-general ...)

As someone who has used TypeScript for her day job, it's better than nothing but wow do I spend a lot of time fighting with it sometimes compared to other typed languages.

lethal walrus
#

as unknown as any solves all problems

ivory shadow
#

any notlikeblob

cinder karma
ivory shadow
#

I mean TypeScript would be a step up over Python at least.

#

(For me, that is.)

cinder karma
#

I dont' enjoy the idea of writing c code to bridge typescript and labview

bronze idol
#

we're learning blazor. i'm kind of a C# fan, but i started in C++ and then didn't really cut my teeth until java

#

so i just like C# because it's like stuff i know

#

but blazor is neat, i'm having fun with it

#

"we" i'm not plural, i just mean us at irl work

safe dragon
#

Blazor is pretty nice though it has a few quirks that drive me nuts

#

main issue I'd say is just that it performs poorly

#

the new hybrid render mode might fix some of the issues I had but it's too late to rewrite the project for that now

#

though I've heard mixed things about it

cinder karma
#

LabVIEW is a write only language

#

My God j miss being able to right click and see WHO mutated my global

#

Without my permission

sand frost
#

The ISO 639-1 two letter list of languages is trash

#

It doesn't include Cebuano, a language with 20 million speaker, but does include Nauru, with 10,000

#

Also all Chinese is zh (pay no attention to Cantonese (spoken differences) or traditional vs. simplified (glyph differences))

#

I guess it's maybe the best we have for LanguageCode but...

cinder karma
#

What brought this on?

sand frost
#

I went down a rabbit hole

#

It went through a lot of places

cinder karma
#

I love rabbit holes!

sand frost
#

But one of them was the custom languages part of the wiki

#

and some of the others were the ISO 639-2 and ISO 639-3 lists

#

Basically reading down them to see what ISO decided was/wasn't level 1 tier

#

And it seems incredibly based on country borders

cinder karma
#

Ahhhhhg

#

Do cats get their own language

sand frost
#

Not as far as I know SDVpuffersquee

#

Rust is the cat ears language, right?

#

Or was that the knee socks?

cinder karma
#

...both

sand frost
#

Perhaps cats can have Rust, then

hidden jungle
#

cat for catalan

#

i just realize toki pona is listed on ISO 639-3 SDVpufferpoggers

hidden jungle
crystal wren
#

So this is... definitely more than just font rendering weirdness, I'm happy/annoyed to report!

#

So I opened GIMP, and drew a jagged diagonal line in each primary colour. Then screenshotted each at 100% zoom to try to sanity check and rule out the font rendering.

I got... interesting results.

safe dragon
#

👀

crystal wren
#

I am officially in what the shit mode.

#

8x'd for viewability on Discord, but uhh...

safe dragon
#

why is there antialiasing on gimp pixels

crystal wren
#

That's just the thing... there is none (at least in the original). That's the source for the screenshots.

sonic mirage
#

Could something be compensating for an unusual subpixel layout of a monitor?

crystal wren
#

Yeah, that's the only working theory.

safe dragon
#

it's very strange

#

blue doesn't have the issue either

#

is it some strange type of display panel

crystal wren
#

It's not some abnormal subpixel layout either though is the thing.

safe dragon
#

regular ol rgb

crystal wren
#

And it definitely only happens on this one monitor, which is fine in Windows.

sonic mirage
#

So either a display driver or whatever is used to adjust the ICC profile, I guess

crystal wren
#

So it's clearly not just sneakily running at 4:2:2 or 4:2:0 chroma, because blue is fine.

sonic mirage
#

It's really like your display driver thinks your monitor has a different subpixel layout, which is an interesting issue to have

#

Or I guess whatever runs on top of the driver that would apply smoothing

#

You don't have like ReShade or something running somehow

crystal wren
#
name:           amdgpu
vermagic:       6.1.0-18-amd64 SMP preempt mod_unload modversions

Yeah, not some abnormally old version of this or anything...

sonic mirage
#

or if not ReShade maybe like a blue light filter or "night mode" that filters out blue for later at night

#

I wouldn't think that'd do this antialiasing though

#

weird

safe dragon
#

KDE does have a built in one but I can't imagine it doing that

#

I wonder if you wouldn't have the problem if you switched to the proprietary amd drivers

crystal wren
#

...lemme flip my display horizontally in software and see if it's somehow trying to use BGR.

thin estuary
#

i'm not sure what i'm looking at, considering the blue line image seems to be done at a different scale - the dashed lines around the image don't match up with the others'

crystal wren
#

The XCF those screenshots were taken from is up there. I think that was just me drawing it slightly differently!

#

Oh wow... Shockah, yeah, that is something*.

#

In the source, the blue line is identical to the others. But GIMP is... also rendering that badly at 100%?

winged grove
#

what kind of features could be added in stardew valley base game if it was on lets say the latest .net? It just makes me curious for future updates to stardew valley and what could be added a later patch down the road. This is bugging me

cinder karma
#

What do you know about net 7 and 8?

#

Unless you're a performance geek, there isn't really much new that would be useful in the context of video game

winged grove
#

Nothing i'm no programmer but just interested in what features add from version to version. Just wondering if every update to stardew he might update his version for more added features

#

Then again would you get faster loader with the newest version? That might be a added plus?

cinder karma
#

There is better simd support. The regexes get faster

#

Like, unless you are some sort of performance geek you really don't care about this stuff.

winged grove
#

Ah I see, so better loading speeds but then again it might help modding?

sonic mirage
#

They also keep an older compatibility branch of the game up-to-date (due to the big random bug in Mono) that has to be built against .NET Framework, so they can't get too advanced with the .NET stuff.

thin estuary
#

It’s unlikely Stardew will ever update .NET again

#

Doing so would drop support for older versions of Windows

cinder karma
#

Don't get me wrong I'm super happy with the new regex I just don't really think it matters in the context of stardew

thin estuary
#

static interface members would be nice, but oh well

safe dragon
#

just update to the newest version of .NET smh ppl with old pc's should just upgrade smh

thin estuary
#

i'm all for it, but you'd have to convince CA

#

supporting Windows 7 and Windows XP in 2024...

safe dragon
#

I know how it goes when we try to convince management we need to stop supporting cash registers running XP

#

Windows 7 is what the vast majority of the cash registers are running tho

thin estuary
#

i don't remember the last time i've seen XP

#

also Steam no longer supports either

#

but there are still other platforms

safe dragon
#

minecraft just dropped 32 bit support in the most recent snapshot

thin estuary
#

As of January 1 2024, Steam stopped supporting the Windows 7, Windows 8 and Windows 8.1 operating systems.

#

32-bit? i assume Bedrock?

safe dragon
#

nope Java

thin estuary
#

why would it matter for Java

safe dragon
#

they updated to some Microsoft branch of Java 21 idk

thin estuary
#

meanwhile, a lot of devs probably still using Java 6/7/8 out there

safe dragon
#

that's life

#

Java 8 is 10 years old damn

vocal shoal
#

has anyone here modded BG3? I wanna try but I’ve been struggling to get it working.

crystal wren
dapper sinew
#

anyone here know Linux stuff, having trouble with pip in a venv(sorry if this isnt the channel/place to ask)

#

nevermind i got it

safe dragon
#

this is the correct place to ask

#

though I know nothing about pip other than that in rare occasion some random application wants me to install it through pip which has a 50% of not working

dapper sinew
#

that was my issue

#

pip just kept saying

pliant snow
#

It's been a while since I've done it, but I used to use venv all the time

#

I ended up just using docker more

dapper sinew
#

i have AI stuff that all needs different venvs

#

gets to be a bit much but i like AI its cool to me

#

like i get to see my creations learn and grow panda_happy

sand frost
#

anyone know anything about creating Texture2Ds by gluing them together?

#

Internet says this can be costly so ideally I would cache it

#

but idk very much about costly stuff

#

(this is for C# modding but general enough I feel like it could go here)

cinder karma
#

Sure

marble jewel
#

There are ways, some are easier than others. When working with the underlying data it's probably better to use an IRawTextureData

cinder karma
#

Check the smapi asset editor

#

😛

marble jewel
#

Oh, wait a second, where am I

cinder karma
#

Elizabeth want me to just do it haha?

#

I wrote batch edit code for JA remembe

sand frost
cinder karma
#

Yeah check the batcher

#

Off my fork

sand frost
marble jewel
#

Does anyone else frequently switch between Mac and PC? I've got a work Macbook, and I'm starting to build muscle memory around Apple hotkeys so it trips me out every time I go between and my ctrl, alt, and windows/command key are all different

cinder karma
#

Yes. You just have to deal with hitting thr wrong keys all the damn time

marble jewel
#

Another thing I hate is that they tied the trackpad behavior to the external mouse scroll wheel

#

So no matter what my setting is, one of them will be the opposite of what I want it to be

#

And I don't have sudo on my work mac so I can't do any of the tweaks/hacks to change that

ivory shadow
#

This sort of thing is why I refuse to use Mac OS

marble jewel
#

Don't get me wrong, it's great in a lot of ways. But the ways it's not are super frustrating.

sand frost
marble jewel
#

I like how they handle multitasking on a small screen. Battery life is great. I think it's pretty cool I can use my phone as a webcam.

cinder karma
#

If both machines are you you can use powetoys to rebind keys

marble jewel
#

Since my home is PC, I should probably get used to Mac and modify my Windows to be more mac like.

#

My finger placement for copy+paste keeps moving back and forth. It's like I gotta switch my brain when I'm done working.

sand frost
#

I just sort of suffer through windows tbh

cinder karma
#

Yeah, or ask work for a quick sudo sess to change settings

sand frost
#

I use a completely different keyboard though

#

so I don't really have problems much with keypress muscle memory

cinder karma
#

Dunno if that is allowed for you

sand frost
#

so I guess my tip is "have a poor sense of ergonomics and small hands" (terrible tip)

safe dragon
#

I’d probably just swap the keybinds on mac(assuming that’s possible I’ve never used one) so that it aligns with how it is on windows/linux

marble jewel
#

They have a setting I can change, but it's not 100%

#

Like it has other side-effects for me to just simply say "make the apple command key into ALT"

safe dragon
#

I’d use macos in a heartbeat over windows if I could actually build the pc myself(not counting hackintosh)

pliant snow
#

you can build it yoursef, it just comes in one piece

safe dragon
#

it comes in one piece and you pay hundreds upon hundreds of euros just for some extra ram or storage

marble jewel
#

I like a lot about it, but just wish they catered to power users a bit more

safe dragon
#

I just wish they didn’t scam you so extremely on upgrades

#

apple pretending that 256 gb of extra storage costs them 200 euros

marble jewel
#

But... it's the perfect intersection of hardware and software. You can't put a price on that /s

#

Actually you can, and it's marked up 150%

#

And taxed at 20%

safe dragon
#

maybe someday I’ll have to use macos for work and I’ll find out what it’s like

#

but to buy one myself has just never seemed reasonable with their outlandish pricing

marble jewel
#

I made the choice to upgrade from a Lenovo to a Macbook, and I'm generally happy with the change aside from some of the annoyances

pliant snow
#

yeah the machine itself is expensive, but not outragously so... until you want more ram or storage

safe dragon
#

yeah if you get the base model it’s just “very expensive”

#

if you want anything more

#

you pay a fortune

marble jewel
#

To me the worst part is that it's so close to being so much better, but I know deep down inside the problems I have are not ones Apple would ever address

pliant snow
#

at least for laptops, the mac minis are pretty comptetively priced

safe dragon
#

my ipad frustrates me to no end which is clouding my expectations for macos probably

#

ipados just doesn’t let you do fuckin anything that would actually make it work nicely

marble jewel
#

Some of the newer iPad settings that you can turn on are the exact same as how MacOS works

#

Like if you enable multitasking with the side windows thingy

safe dragon
#

is there a setting to buried somewhere to have an actually functional normal filesystem…

marble jewel
#

I turn those off because the way I use my iPad is one app at a time filling the screen

pliant snow
#

yeah, ive never been thrilled with how iphone/ipad does some things

marble jewel
#

The design of the two have slowly begun converging over the last couple of years

pliant snow
marble jewel
#

Like iPadOS gets a bit closer to MacOS and vice-versa

safe dragon
#

I can’t tell you how incredibly annoying it is for me that apple completely splits the concept of photos and files. Instagram for example can only access “photos” and not files. I edit my photos in the ipad version of lightroom and then save them, but it saves them as “files” not as “photos” so they’re completely inaccessible to something like instagram unless I manually “save” it to photos

#

on ios/ipados anyway

marble jewel
#

Yeah, I dislike the trend of hiding the concept of files/folders from users

#

It's like how Windows 11 hides extensions and directs users to libraries

cinder karma
#

Yup

pliant snow
#

im told the youth are weirdly computer illiterate when it comes to filesystems, but i donno if thats also just older people yelling about the kids these days

#

okay, i hate how they hide extensions

cinder karma
#

We're too attached to CAD software to do anything but windows tbh

marble jewel
#

I wouldn't mind hiding extensions if we just got away from them entirely and instead depended on headers or something for file formats

safe dragon
#

I use a paid third party file app on ipados just to have it be manageable at all. The standard file app also completely crashes when it tries to upload any files to my smb storage to begin with so it’s essentially unusable for my use case

marble jewel
#

But as long as extension = file format, I don't think there's any positive to hiding them

pliant snow
#

I mean, you can argue most software really is just using headers or whatever under the hood

#

the extension's greatest purpose these days is arguably for its default app

safe dragon
#

though that uses its mimetype which is technically separate from its extension

#

well

#

that’s how it works on linux

#

idk about windows

marble jewel
#

It's the same

#

I wonder what a file system would look like that only used uri based handlers. Would that be possible.

safe dragon
#

honestly after this tablet shits the bed I’ll probably look into getting a light laptop of some kind instead cause these tablet operating systems are just frustratingly limiting

#

especially apple’s tablets…

marble jewel
#

I have an iPad and as long as I limit my usecases for it, I find it reasonable

#

Like, reading my rss feeds, browsing the web, and chatting on Discord

safe dragon
#

it works alright when you completely ignore that they desperately attempt to market ipad to be useful to “professionals”

#

which they objectively just aren’t

pliant snow
#

someone out there is living in ipad excel

marble jewel
#

*shudders I can't imagine

#

I was convinced that iPad would have ended up closer to a Macbook as soon as they started shipping with the M1 chips and beyond

#

Like, you have all the necessary guts, why not unlock it's productivity

#

Alternatively, if they had a Macbook with a touchscreen, I might've gone for that

#

Apple likes to carve their niches for each product

safe dragon
#

they just added some multitask features, made it less awful with an external monitor and made the files app ever so slightly more usable

#

that they do

#

frustratingly so

marble jewel
#

I sometimes try to be helpful, but then end up muting that channel again

safe dragon
#

I’ve definitely learn that computer literacy has gone down significantly in the “tablet” generation

#

can’t wait till comp sci majors need a course in how to use a desktop OS cause there will be a lot of students who’ve never used one

#

I know a lot of families already that don’t own anything other than a tablet

#

bring back the family pc hc_pensive

sand frost
crystal wren
#

As much as I'm not a fan of Apple's... practises, even I have to give them that the iPad really is great for professional illustrators or artists!

That's... the only area I can think of, though.

cinder karma
#

Heh, I joke that my generation is the last to actually know how computer works

#

But every generation has its share of nutty enthusiasts

#

Says a nutty enthusiast haha

#

It's not hard. Tbh. A good student will pick up the skills fast

#

(The kids will be okay)

safe dragon
#

I'm technically a zoomer myself hc_pensive

#

'97

#

the fancy ipods and eventually smartphones started becoming a thing here for me when I was 16 ish

dapper sinew
#

LOL i did NOT expect this to work

#

i did it for the memes and it actually functioned on my phone

safe dragon
#

nice

#

man what is using 6 gigs of ram

#

2 gigs of swap memory is also being used

#

is there any way to even see what's using memory in android

#

htop doesn't show anything

#

I've closed every program and it's still using 4.5 gigs

#

rebooting doesn't even seem to clear the swap memory what the hell

dapper sinew
dapper sinew
safe dragon
#

termux

#

btop doesn't seem to be on termux

#

from what I can tell you simply don't have this information anymore on android...

dapper sinew
#

i just got termux and nix-on-droid

safe dragon
#

idk I just installed termux

#

nothing else done I think

#

it's been a while

dapper sinew
#

so cursed to see on phone

dapper sinew
safe dragon
#

I'll give it a shot

#

never used nix before

#

always seemed like it's a little clunky

#

how does one even install a package

dapper sinew
#

it takes a while to download the start up stuff

#

but after thats its quick

dapper sinew
safe dragon
#

this nix-env -i thing doesn't seem to do anything

#

oh huh

#

do I have to enter a nix shell first

dapper sinew
#

should just be something like nix-shell -p firefox nothing else

#

since my phone is rooted idk what all is blocked from a normal user

safe dragon
dapper sinew
#

oh yeah so hold down the app icon

#

and you should see failsafe

#

use that for btop

#

you might have to do

#

/data/data/com.termux.nix/files/usr/bin/login

safe dragon
#

seems clunky to say the least if I can even get this to work

dapper sinew
#

btop didnt install

#

im guessing failsafe needs root access

#

since i see Permission denied

safe dragon
#

well I ain't rooting my phone so rip

dapper sinew
#

yeah

#

thats fair

#

took me forever to figure it out

ivory shadow
#

I kind of want to make a build thing for Stardew mods to strip unused code from API interfaces. But that sounds like a total pain in the butt.

cinder karma
safe dragon
#

what on earth am I even looking at

#

this can't be valid code right

#

regardless of language

dapper sinew
#

probably is in at least one

#

probably

safe dragon
#

the for loop extends beyond its case statement...

cinder karma
#

Yes. And?

dapper sinew
#

chaos

cinder karma
#

Switch cases: goto in disguise

dapper sinew
#

i find it funny how something can be both true and false in code

#

because... why not

safe dragon
#

I have no idea what this code would even do if it were valid

cinder karma
#

Every time it is called it returns one number

dapper sinew
#

i do wanna know what language that even is

safe dragon
#

considering the explicit and some Googling, C++

#

I'm starting to parse how this would in theory work

#

but it'd require switch cases to be implemented in the most fucked up way imaginable

cinder karma
#

Exactly!

safe dragon
#

if switch cases actually work like gotos and are also allowed to be nested inside of each other for some messed up reason then this might actually be valid code

cinder karma
#

They're just gotos!

safe dragon
#

with some deceiving formatting

cinder karma
#

Have you seen duff's device?

dapper sinew
#

UM

#

There are no errors

safe dragon
#

I don't even know how how to read normal c++ man

#

yeah I'm starting to understand but I disagree a lot with this

safe dragon
#

I'm appalled

#

I looked it up

cinder karma
#

Haha

#

Wrote this this morning haha

safe dragon
#

please run a formatter SDVpufferwaaah

dapper sinew
#

my brain hurts looking at that

#

i mean, i cant talk i make odd code

#

mostly cause im new to it

#

plus i dont care how it works so long as it does

#

(me making a .js script run python that runs cpp that.....)

cinder karma
#

Eh, stylecop allows it

#

(And I indent like this for fluent APIs)

safe dragon
#

forever the bane of my existence that C# did not set a formatting standard and default formatter

#

so nice to have languages where essentially everyone formats their code the exact same way

#

due to an opinionated formatter built into the tooling

grave gate
#

How should i indent this? I feel like it looks bad any way i try, maybe im overthinking it

sand frost
#

you can use the one line if syntax

#
if (thing)
  return true;
#

if you feel like the right image is too verbose

#

personally I would do the one on the right but I am sure other people have stronger syntax opinions than I do

pliant snow
#

I kinda like the one on the left ngl

#

Ideally, you could use a switch statement, although I think your conditionals are different enough that it would be more of a mess than what you have now

regal ingot
#
if (whatever) {
    SetThingy(player, blarg);
} else if (something_else) {
    SetThingy(player, frotz);
} else if ....
pliant snow
#

I like the early returns better tbh

regal ingot
#

I can see the argument when it actually saves any indenting from not having nested ifs... but it doesn't in this case.

cinder karma
#

I like matxh stateme ts

sonic mirage
#

People are so afraid of whitespace when it makes things so much more readable. "Compact" code doesn't run faster and is slower to read, therefore slower to maintain.

if (whatever)
{
    SetThingy(player, blarg);

    return;
}
else if (something_else)
{
    SetThingy(player, frotz);

    return
}
else if ....

I always have a blank line above return/continue/breaks so they stick out more. And I never use the bracketless if because it's so easy to add a line after it and not notice that's it's not going to work properly anymore. I do love a good ternary though, but if they get long I tend to split them across lines:

string whatever = someBoolThing
    ? $"Some long string {here}"
    : "some other long string here";
#

Also, when breaking something across multiple lines, I always put the operator at the start rather than the end since it's easier/faster to see them (like with the ternary)

#

VS tries to do this nonsense by default:

string something = "the start" +
    "the end";

when it should be

string something = "the start"
    + "the end";

because the operator is more easy to spot since they're always left-aligned, basically

azure verge
sonic mirage
#

C# doesn't do that, as far as I'm aware

#

If you have a single string and hit Enter to break it across lines, a newer thing VS does is add the " and + for you so it's still valid, but it puts the + on the first line, so I need to change that at some point.

azure verge
sonic mirage
#

Yeah I just haven't gotten around to it; I know you can change your "preferred" style

azure verge
#

and lint always exists

regal ingot
#

...one of the lesser-known features of C is that two adjacent string literals are turned into a single string by the parser. No need to add a + for breaking things up to fit in whatever line width requirements you have.

azure verge
regal ingot
#

I'm not sure how "baked into the language specification" is freedom. It's not optional. The parser must do it.

#

It also comes in handy for writing preprocessor macros where you can "paste" an argument as a string literal and just put it adjacent to some other string literals to make one big message.

#

Also for portable printf format specifiers (even if that does make the format string a bit unreadable)

azure verge
#

two string literals might be accidentally adjacent (the author might've forgotten to assign variables for one of them). So the code might've been compiled unintentionally.

#

that's what I mean

sonic mirage
#

Most languages have some form of string interpolation, so I think that's less useful than it may have been in the past

regal ingot
#

C is not exactly noted for holding the programmer's hand if the fuck something up.

sonic mirage
#

Just doing $"{string1} {string2}" is pretty easy and more clear than strings magically getting concatenated

regal ingot
#

It's not magic... it's just that all of the successors to C forgot to include this really obvious feature.

sonic mirage
#

Wouldn't be surprised is C didn't support that, but C++ might with all the stuff it keeps getting

#

Haven't touch C++ since Intro to Comp Sci II though

regal ingot
#

magic is the compiler turning an interpolated string back into a single adjacent run of characters stored in the program binary.

azure verge
sonic mirage
#

I mean it's job is literally to compile things; just depends on the syntax, and two strings being near each other without an operator to form an expression just seems like an accident waiting to happen

pliant snow
regal ingot
#

yes

pliant snow
#

Well I'll be

azure verge
#

this man is a skeptic

pliant snow
#

clang and gcc both do it

#

which isn't surprsing

regal ingot
#

Also, like I said, useful for portable printf format specifiers:

printf("this is a uint64_t value: %" PRIu64 "\n", foo);
azure verge
#

I thought it was a parser's "feature" 😄

regal ingot
#

off-topic is the place for irrelevant questions 🙂

leaden marsh
fierce meteor
#

okay this is not really programming but could someone on MacOS help me? I use iTerm2 as my default terminal but running Stardew Valley from GOG or Launchpad opens SMAPI via the vanilla Mac terminal

#

I've also set iTerm2 as the default app for .command files. but SDV still uses Terminal on startup. how can I make sure that SDV or other MacApps that launch via terminal open with iTerm2?

scarlet sail
#

anyone know java script and could join jojo-mart voice?

lethal walrus
#

why?

scarlet sail
#

i need help

lethal walrus
#

yes but why vc

scarlet sail
#

so i can my screen

lethal walrus
#

and what category of js?

scarlet sail
#

sdk 17

lethal walrus
#

general syntax? node? vanilla frontend? a frontend framework?

scarlet sail
#

I just seeing if I'm on the right track

#

understand the program more

#

constructors, methods and class making

dapper sinew
#

anyone know an app that can do live usb boots, needs to work on linux and idk how to use app images(trying now but its not working)

cinder karma
safe dragon
#

same

#

yes please explain to me how American dishwasher models operate

thin estuary
#

Love this guy

safe dragon
#

as I sit there confused why they don't have a dishwasher salt compartment

frosty robin
#

I basically learned what dishwashers are from this guy (we dont have them here)
The toaster video was great too

pliant snow
#

you are the dishwasher

frosty robin
#

penny washes dishes for hours a day

river depot
#

Don’t you hate it when you’re trying to find stuff for your mod and your internet just goes out RoyStressed this close to finally getting this mod to a releasable state and now I can’t access any websites I need

#

Oh nvm it’s just nexus and smapi that are down

ivory shadow
#

atra you'll be happy to know I'm finally using CodeMatcher

supple ether
#

I'm happy too

dapper sinew
supple ether
#

it's a tool to make writing transpilers easier and clearer

cinder karma
#

Nom nom nom

marble jewel
#

I really, really, really should get around to that at some point

devout vault
#

What's a code matcher, I do all my transpilers by hand like Brainzz intended /s

marble jewel
#

I'm still using dumb transpilers

cinder karma
#

This seems very on topic

ivory shadow
#

I literally do all my transpilers (so far) by hand.

cinder karma
#

Someone go write a parser combinator engine for transpjlerd

#

Until then

#

Nom Nom Nom!

marble jewel
#

tbh I don't think mine are too bad because I generally go with the simplest approach. Like single method replacement to redirect.

#

Or just insert the vanilla method into mine to hijack the return value

cinder karma
#

I don't like single method replacements

devout vault
supple ether
cinder karma
#

What if two mods want do the same thing

dapper sinew
#

IDK what a tranpiler is

#

Sounds fancy though

marble jewel
supple ether
cinder karma
#

You joke but khloe over there

ivory shadow
#

carefully pushes Theme Manager behind the couch out of view

cinder karma
devout vault
#

There's a couch in here?

#

Why have I been standing this entire time?

dapper sinew
ivory shadow
#

I just figured someone put you in the corner for doing something bad

devout vault
#

I'm perfect /s

dapper sinew
#

I use my Linux terminal to complete my cpp code at least

cinder karma
#

Or, more realistically, go "fuck all this shit let me write fun code instead"

#

"Fun and Interesting code"

devout vault
#

(I probably did do something bad, if any of the Nexus comments are any indicator)

supple ether
marble jewel
#

This is bad, I know:

    private static IEnumerable<CodeInstruction> Debris_collect_transpiler(IEnumerable<CodeInstruction> instructions) =>
        instructions.MethodReplacer(
            AccessTools.Method(typeof(Farmer), nameof(Farmer.addItemToInventoryBool)),
            AccessTools.Method(typeof(CollectItems), nameof(CollectItems.AddItemToInventoryBool)));
ivory shadow
#

Nexus Comments are only an indicator that people can't even read a single pinned comment before posting about the same bug as 99 other people

supple ether
#

trust me you would know. you absolutely cannot make a transpiler by accident :P

cinder karma
#

I mean, Matt, why should I care, when nom so fun

supple ether
#

or the mod description, or existing bug reports, or anything really

devout vault
dapper sinew
supple ether
#

that's why I nuked the aerocore page completely

devout vault
ivory shadow
cinder karma
devout vault
#

ACTUALLY... /s

ivory shadow
#

Are you patching it in something?

dapper sinew
devout vault
#

I'm not doing anything with NetMutex.Update, I was joking

ivory shadow
#

Honestly, I should start making Better Crafting do a harmony_summary the first time a trace log happens.

#

To see what is being patched

devout vault
#

That would be a nice base SMAPI thing

#

Though some people delay their patches to gamelaunched

cinder karma
#

Again

ivory shadow
#

I mean like, when my error condition happens for the first time

cinder karma
#

This seems on topic

devout vault
dapper sinew
#

I should make a cpp test mod but eh I got no good ideas and I can't code well anyways

ivory shadow
#

Sorry atra

ivory shadow
#

My head is too full of netmutex I can't release it to talk about other topics

devout vault
#

It looks like it'd be a smarter way of doing things than the mess I did for my mini scripting language

marble jewel
ivory shadow
#

I wish we had a community Sentry instance.

#

I can only imagine the server costs though.

devout vault
#

Sentry?

supple ether
#

I wonder what sunkissed city will be like to mod

ivory shadow
#

Sentry = application monitoring software. Automatically reports exceptions to a server with stack traces + whatever state you attach.

#

We use it at work and it's pretty nice. Groups exceptions together. We can tag different people based on where the exception was.

supple ether
#

would be useful. the other day I asked for a log and someone gave me a google drive link

sand frost
#

Damn

#

Sometimes people copy paste the terminal text but that’s worse

thin estuary
#

"TiReD oF sEeInG sTaCk TrAcEs LiKe ThAt?"

ivory shadow
#

lol

#

I don't really reddit, so I guess I don't see them.

thin estuary
#

every. single. day. for. at. least. the. last. 2. months.

#

and i'm not even interested in Android at all

ivory shadow
#

Wonder if reddit is having trouble getting advertisers

supple ether
#

wouldn't be surprised given how they keep flushing their users' good will down the toilet

safe dragon
#

they should see our stack traces when we're 5 layers deep in services in our asp.net core apis

#

you can scroll for a good minute to get to anything that provides any kind of information

#

never used sentry

#

we just have a grafana dashboard we yeet loki logging to

#

yeet is the technical word I'm sure

cinder karma
#

it absoltuely is

safe dragon
#

ah yes one of my favorites

cinder karma
#

fucking love Rust to pieces

#

wishhh I had more to do with Rust

#

hey Nvidia....

safe dragon
#

I wouldn't mind a job in rust but most that I can find I'm either not remotely suitable for or it's stupid fuckin Web3/Crypto startups

cinder karma
#

yeahhhh

crystal wren
#

Positives: Money!
Cons: SDVpufferwaaah

supple ether
#

I wanted to do an ink-style narrative engine in rust but I kinda gave up on it after I realized I would also have to write the parser at the bare minimum

sand frost
#

My friend who does rust reports the same 😔

safe dragon
#

honestly it feels like the majority of tech jobs in my country are .NET or javascript jobs. I'd like to transition out of .NET jobs but idk where to or how

supple ether
cinder karma
#

I've been in pythonland a lot recently, where using Rust with Maturin is a decent strategy for "why so slow code?"

pliant snow
#

I like Rust, but at the same time it can get in your way even in situations where you don't really need it

safe dragon
#

when I go to indeed and search "rust developer" as job I get 3 .NET developer jobs as my first results

pliant snow
#

I mainly use it for wasm now lol

supple ether
#

yeah rust is good for wasm

safe dragon
#

not a whole lot of other languages out there with a mature wasm build target

supple ether
#

as long as you're prepared to not use a bunch of the std libs anyways

pliant snow
#

That's the kicker

safe dragon
#

first rust job I found on indeed is a bitcoin trade startup gdi

#

why am I getting more "drupal developer" results than rust when my search query is "rust developer"

#

I'm afraid the rust programming language does not exist in the netherlands

#

a shame

pliant snow
#

I thought they had all moved onto AI junk now

#

probably why the job is open lol

safe dragon
#

tf is Hyvä

#

I see

#

a theme on top of magento

#

which I also don't know

#

some adobe shit ew

#

wtf this company offers a "travel reimbursement" of 600 euros a month. Where tf am I traveling

sand frost
#

is it a remote job??

safe dragon
#

"at most 4 days remote a week"

sand frost
#

weird

cinder karma
#

so remote

#

unless it's like, one of those jobs where you're remote four days a week and on site for four

#

oh wait you're european

#

you don't do shit like that.

#

I see Elizabeth melting

safe dragon
#

how many days are in your weeks?

sand frost
#

how much of a crime is it to put every single change into one PR if I'm not sure that they can survive being separated

#

5 days (or...7...I guesssss)

#

(I'm in academia)

safe dragon
#

4 days remote and then 4 days on site a week hc_pensive

#

gotta work 8 days a week

sand frost
#

think atra means alternate weeks??

cinder karma
#

no, that's the joke lol

sand frost
#

oh dear

#

atra, maybe you deserve the melting emoji

#

I can take it off my name if you need it 😛

cinder karma
#

nah, atra will live

pliant snow
#

So zero remote, ur comin in

safe dragon
#

I'm starting to think indeed is just not very useful

#

hell ye

crystal wren
#

I've found literally one Rust job locally...

safe dragon
#

incredible how every rust job requires years of experience in rust

#

where exactly would I start

devout vault
#

I looked into super smash bros ultimate modding at one point and it used Rust I think

#

At least a few years ago

safe dragon
#

unfortunatley I don't think smash bros ultimate modding is gonna pay my bills

devout vault
#

Hehe, true

#

That's the closest I've come to dabbling in Rust myself

crystal wren
#

Just need to become the #1 most uber-popular mod for it, then it might pay one of the bills.

safe dragon
#

yeah that's pretty much what you gotta do

#

I don't think this is the correct type of developer

pliant snow
#

I like how neither the job role nor company gives an indication of which type of developer it is

safe dragon
#

hmm they want a degree in food science

#

and you develop actual cooking recipes

sand frost
#

that sounds fun

pliant snow
sand frost
#

I'm mostly unqualified for that

cinder karma
#

belive in yourself!

sand frost
#

I do not have a degree in food science

#

I have many degrees, but that isn't one

#

not unless food = math these days

cinder karma
#

yes but you have been making food for yourself for more than twenty years so

pliant snow
#

nah, mom still makes hot dogs

safe dragon
#

don't think my mom has ever made a hot dog

#

neither have I for that matter

sand frost
#

my mom thinks hot dogs are not good food

pliant snow
#

your mom is probably right

safe dragon
#

bit of a luxury problem but I'm starting to realize I'm currently being paid way outside my qualifications

#

what are all these jobs man...

pliant snow
#

which direction lol

safe dragon
#

the good one

pliant snow
#

oh thats good

sand frost
#

has anyone else been having this issue where new github is crazy slow to load?

#

like I don't understand why it's so hard to show me plain text files

safe dragon
#

github has never been slow to me but idk if there's a "new" github

pliant snow
#

how new is new github

sand frost
#

idk a couple months?

#

it's their like thing where it shows all the files to the left

pliant snow
#

I'm not sure I even noticed

sand frost
#

and has a list of functions on the right

#

and a search bar and stuff

#

all their "rich text" kind of stuff takes like several seconds to load properly

pliant snow
#

Do you know the github secret

sand frost
#

and sometimes i have to refresh the page for it to load right

#

no

pliant snow
#

is the page open now

sand frost
#

?

crystal wren
#

I want to spoil this secret.

#

I know it!

sand frost
#

I'm viewing github rn

pliant snow
#

is the github page link open right now

#

hit period

sand frost
#

it is now unrepsonsive

#

it claims to be "loading"

safe dragon
#

oh that secret

pliant snow
#

It is loading

#

however, this sounds like something on your end

safe dragon
#

I pressed period and it was done loading in roughly 5 seconds

sand frost
#

I did use it to fix a merge conflict the other day

#

in the browser, which was admittedly much nicer than doing it in terminal

#

which generally involves cursing and spamming :x

pliant snow
#

I use a terminal basically for everything in git, except for merge conflicts, where I just use VSCode

strange copper
#

Vscodes merge conflict resolution gui is so good

pliant snow
#

I'm not sure if it's actually good, but I really hate those three way split programs

devout vault
sand frost
#

I don't use vscode on this laptop for anything

pliant snow
#

It's neat huh

devout vault
crystal wren
#

It turns out I did not know this secret. What does it do!? SDVpufferwaaah

devout vault
#

<insert another rant about perforce>

pliant snow
#

It's nice for when you want to find soemthing without cloning it down

crystal wren
#

I'm vaguely gesturing towards being only on my phone right now.

sand frost
#

||it seems to open a text editor? didn't work for me||

safe dragon
#

even when I use a terminal code editor I use a gui for git stuff(lazygit in that case)

pliant snow
#

Yeah it opens the project in a web version of VSCode

#

i couldnt get into lazygit

crystal wren
#

It's a shortcut to the... github.dev trick? Neat!

devout vault
#

I use git command line

pliant snow
#

why merge branch when coworker can merge branch

sand frost
#

I used the command line for most stuff but I hate merge conflicts

safe dragon
#

I use the git cli on my home server dev environment cause I can't be bothered to install lazygit on debian

devout vault
#

Huh, I've never seen lazygit before

safe dragon
#

it's alright

pliant snow
#

the developer of it has a few

#

lazydocker i know is theirs too

#

lazydocker had one really obvious feature missing, although I cant recall what it is now

#

like you could'nt pull or something

safe dragon
#

tbh I feel like if I actually got a dev job outside of full-fledged IDEs I'd end ups going with something like vscode anyway even though I use neovim for hobby stuff

pliant snow
#

is the server based dev environment just for compilation times

safe dragon
#

what do you mean

pliant snow
#

why develop on server

safe dragon
#

cause I'm away fairly often staying at my mom's

#

where I'm on an ipad

#

I ssh into the server

#

to develop

pliant snow
#

with neovim i assume

safe dragon
#

yes

pliant snow
#

i see

safe dragon
#

it's how I did advent of code last time

pliant snow
#

how very iron man of you

#

I just sync everything

safe dragon
#

.g splunk development

heavy daggerBOT
safe dragon
#

saw this word in a job posting

#

truly a word

#

24.5 vacation days... why .5

#

(25 is essentially the industry standard here)

#

Experience and affinity with pensions

charred lagoon
#

Hey, this might seem like a weird and random question, but are there any things that you love/hate/want to change about nexusmods? Can range anywhere from design, functionality, to random peculiarities, as arbitrary or as specific as you want. Both from a developer and user experience.

supple ether
#

more emphasis on actively maintained/recently updated mods would be nice
also maybe a user option to hide translations by default, to reduce clutter while browsing

charred lagoon
#

Which translations are you specifically talking about?

sand frost
#

all of them lol

charred lagoon
#

sorry, I more meant of where on the UI, which translations?

supple ether
#

translations show up as a separate mods while browsing, which is kind of clutter. I know that while searching, you can specifically filter out translations, but that's only the search, and doesn't apply to anything on the front page or the quick search at the top

charred lagoon
#

ahhh, ok, got it, makes sense

supple ether
#

I know some people are looking for translations, so I don't think they should always be hidden, but it would be nice to have the option to filter them

charred lagoon
#

As for the actively maintained mods, do you think something like "This mod has not been updated in X months/years" after a certain amount of time would be useful? Maybe some sort of community collaborative effort type thing, where people can mark this mod as broken, or maybe that could be left up to a team of moderators?

sand frost
#

I mean, old mods don't always break

#

but also this seems kinda on-topic tbh

charred lagoon
#

on topic, as in, should be in a different channel?

#

I posted here just to be on the safe side

regal ingot
#

(seeing as it's not about programming, and is about... well, either making mods or using mods, in a meta sort of way)

charred lagoon
#

I felt like this was the most appropriate, as this was under game modding, and didn't fit in any of the other 3 categories, sorry

cinder karma
supple ether
#

that's definitely a joke

pliant snow
#

Can someone explain the hate windows 11 gets? I don't like Windows at all, but I've been using Windows 11 at work and it's honestly basically the same

supple ether
#

I think windows 11 is a actually slghtly better than 10. which is a real low bar but even so

#

windows peaked at 7 and has been downhill ever since

#

I don't think they even care about the pc market any more. except as a way of getting more people to use their internet shitware

supple ether
karmic frost
#

true

#

Though yeah, not getting security updates sucks

supple ether
#

that's enterprises paying microsoft for extended support on legacy software, not a required subscription for individual consumers

karmic frost
#

yup

sand frost
#

are null and the empty string different in C#?

#

"" and null

supple ether
#

yes

sand frost
#

cool

supple ether
#

null is null and "" is just a regular zero-length string

karmic frost
#

Thats why isNullOrEmpty exists

supple ether
#

and not much simpler

karmic frost
#

true

supple ether
#

you could even simplify further to str is null or ""

#

... at least I think so

karmic frost
#

imo using the one function is easier than writing both those

karmic frost
#

looks like python

#

even python doesnt do that though

cinder karma
#

Think so too

cinder karma
supple ether
# karmic frost idk if that'd work in csharp

you can absolutely do patterns like that in c#! the only thing is it doesn't like mixing value/type checks in is statements, and I dunno if it would treat null as a type or value check in this case

supple ether
#

but I've done things like num is 4 or 8 or 19 before

cinder karma
#

I've totally done stuff like that before too

#

?.Count is null or 0

#

All the time

karmic frost
#

I'm a hardware/firmware person so I haven't used CSharp much

#

That's cool

supple ether
#

if you're feeling very fancy you can also do a switch pattern like this

var str = num switch {
  0 => "Zero",
  > 0 and <= 10 => "Ten",
  11 or 13 => "Teens",
  _ => "Other"
};
#

though admittedly that's not a very readable example

sand frost
#

if I set something that has the {get; set;} = default syntax to be null (because the data is missing) will it actually set the thing to null?

sand frost
#

oof

#

uh, idk much about null

supple ether
#

= default only sets the initial value

sand frost
#

i was sort of hoping it would skip the setting thing if it was setting it to be something dumb

#

but that was too optimistic

supple ether
sand frost
#

oh! that also would be great

sand frost
#

the contex is secretly on-topic

supple ether
#
public string MyProperty {
  get => myValue;
  set => myValue = value ?? myValue;
}
private string myValue = null;
sand frost
#

but it turns out the game super hates it when objects don't have descriptions

supple ether
#

also default for many types is null

#

includign strings

sand frost
#

don't ask me why some content packs are adding objects that don't have descriptions

supple ether
#

the only time default isn't null is when dealing with structs and other non-nullable value-types

sand frost
#

yeah, I changed the default to "" though and it didn't help

sand frost
#

secretly all my C# questions are related

cinder karma
#

Default it to "no description"?

sand frost
#

I was hoping the empty string would just leave a weird space in the tooltip

cinder karma
#

Yeah, that is weird

#

Tbh I would try " " next

#

(Just a single space)

sand frost
#

yeah

#

but the problem is that setting the default to "" does nothing when I am explicitly changing it to be null later on when the data is initialized

#

At least, I'm pretty sure that's the problem

supple ether
#

yeah, I would do a null check in the setter

sand frost
#

maybe I just null check in the data reading step

supple ether
#
public string MyProperty {
  get => myValue;
  set => myValue = value ?? myValue;
}
private string myValue = "";
#

this will cause it to not change the current value if someone is attempting to assign it to null

sand frost
#

ah, i seee

supple ether
#

you can also do value ?? "" instead if you want null to still be set, but turned into an empty string

sand frost
#

yeah that seems good

sonic mirage
#

I use String.isNullOrWhitespace because users have broken too many things by putting spaces in them

cinder karma
#

huh https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:csharp,selection:(endColumn:2,endLineNumber:18,positionColumn:2,positionLineNumber:18,selectionStartColumn:2,selectionStartLineNumber:18,startColumn:2,startLineNumber:18),source:'using+System%3B class+Program { ++++static+int+Square(int+num)+%3D>+num+*+num%3B ++++static+void+Main()+%3D>+Console.WriteLine(Square(42))%3B } class+Blah { private+static+bool+Test(string%3F+input) ++++%3D>+input+is+null+||+input.Length+%3D%3D+0%3B private+static+bool+Other(string%3F+input) ++++%3D>+string.IsNullOrEmpty(input)%3B }'),l:'5',n:'0',o:'C%23+source+%231',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((g:!((h:compiler,i:(compiler:dotnet707csharp,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'0',intel:'0',libraryCode:'0',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:csharp,libs:!(),options:'',overrides:!(),selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+.NET+7.0.105+(Editor+%231)',t:'0')),k:50,l:'4',m:50,n:'0',o:'',s:0,t:'0'),(g:!((h:output,i:(compilerName:'x86-64+clang+(trunk)',editorid:1,fontScale:14,fontUsePx:'0',j:1,wrap:'1'),l:'5',n:'0',o:'Output+of+.NET+7.0.105+(Compiler+%231)',t:'0')),header:(),l:'4',m:50,n:'0',o:'',s:0,t:'0')),k:50,l:'3',n:'0',o:'',t:'0')),l:'2',n:'0',o:'',t:'0')),version:4

#

ah, didn't expect that to be that long

sonic mirage
#

Holy URL, Batman

cinder karma
#

it is inlined. I expected that.

#

what I don't expect is the extra manipulation at the top

sand frost
#

I ended up using a space in the end

supple ether
#

oh looking at the actual page it is there, it just has some weird jumping and an extra push/pop in there

cinder karma
#

Otoh I doubt it is gonna be a noticeable performance issue

#

Still I expected identical assembly tbh

safe dragon
#

I wonder why. Looking at the C# code behind IsNullOrEmpty it's the same beyond use of == instead of is

safe dragon
#

I'm not great with assembly but I have no idea why it's doing that it shouldn't functionally achieve anything

#

it seems to be an inlining thing of sorts I'm not sure

#

https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:csharp,selection:(endColumn:2,endLineNumber:18,positionColumn:2,positionLineNumber:18,selectionStartColumn:2,selectionStartLineNumber:18,startColumn:2,startLineNumber:18),source:'using+System%3B class+Program { ++++static+int+Square(int+num)+%3D>+num+*+num%3B ++++static+void+Main()+%3D>+Console.WriteLine(Square(42))%3B } class+Blah { private+static+bool+Test(string%3F+input) ++++%3D>+input+is+null+||+input.Length+%3D%3D+0%3B private+static+bool+Other(string%3F+input) ++++%3D>+string.IsNullOrEmpty(input)%3B }'),l:'5',n:'0',o:'C%23+source+%231',t:'0')),k:50,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((g:!((h:compiler,i:(compiler:dotnet707csharp,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'0',intel:'0',libraryCode:'0',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:csharp,libs:!(),options:'',overrides:!(),selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+.NET+7.0.105+(Editor+%231)',t:'0')),k:50,l:'4',m:50,n:'0',o:'',s:0,t:'0'),(g:!((h:output,i:(compilerName:'x86-64+clang+(trunk)',editorid:1,fontScale:14,fontUsePx:'0',j:1,wrap:'1'),l:'5',n:'0',o:'Output+of+.NET+7.0.105+(Compiler+%231)',t:'0')),header:(),l:'4',m:50,n:'0',o:'',s:0,t:'0')),k:50,l:'3',n:'0',o:'',t:'0')),l:'2',n:'0',o:'',t:'0')),version:4

#

I added a Bonus method that just calls Test and that produces the same assembly as the Other did

#

wait no they're again ever so slightly different, though not meaningfully in that case

fresh gale
#

is there a good turtorvial on how i start to made mods til stardew, i have never made mods before

safe dragon
cinder karma
#

Is there a git merge strategy that is "I really don't care about whitespace stop asking me?"

#

Atra of a month ago and atra of two days ago apparently can't agree on whitespace

#

Also atra of a month ago committed binary files like an idiot

ivory shadow
#

Man atra of a month ago sounds like a jerk

#

Bad whitespace and binary files in git

cinder karma
#

Past atra hates current atra hates future atra

#

No wonder I have mental health issues

safe dragon
#

git removes every piece of whitespace from the file

ivory shadow
cinder karma
#

We were digging through smapi image editing code yesterday

#

And I was very surprised to see the last commits were two years ago

marble jewel
#

2 years, that's a whole feature version of SDV ago

cinder karma
#

The Killers and this overpriced root beer are gonna get me through this merge conflict

supple ether
#

the problem with my code quality constantly increasing is that when I go back to older stuff It's always like "Damn bitch, you live like this?"

cinder karma
#

Yup

#

Who wrote this disaster
...oh

safe dragon
#

god there's code I wrote a few months ago that I've since figured out how to clean up and improve but I've been moved to a different project and don't have time make the changes. It haunts me

cinder karma
#

I also forgot my personal vimrc on this machine

#

So things my personal vimrc handles (like allowing :Wq) aren't on this machine yet

supple ether
#

I was in better beehouses' flower code last night and I think it qualifies for a FEMA cleanup
it's just this gigantic tightly-packed glom of code with a bunch of nested conditionals

#

it's an IEnumerable method too... do I even WANT to know what the compiled enumerator looks like

cinder karma
#

Hahahha

pliant snow
#

Welcome to today's adventure of "why is my server suddenly not showing up on the network"

#

I think i messed something up with my DNS settings

ivory shadow
pliant snow
#

the worst part about DNS is you change something, but everything continues working for like 12 hours

ivory shadow
#

Updated ModManifestBuilder again and decided "Screw it, I'll just post the readme to NuGet too." and its markdown support is 10/10

#

(Compare to GitHub:)

marble jewel
#

To be fair, html tables aren't markdown, and markdown tables are a pain to deal with

#

Given the right markdown editor it isn't awful, but drawing ASCII tables by hand isn't fun

ivory shadow
#

HTML in markdown is valid markdown though.

#

I'm using HTML tables because you can't do colspan in GitHub markdown tables.

marble jewel
#

Yeah, I'm just talking about the pure markdown table syntax though

ivory shadow
#

Oh yeah, it's definitely not great to write.

marble jewel
#

Which I don't even know if NuGet supports that

ivory shadow
#

Maybe! I didn't bother testing.

marble jewel
#

It represents both what's good about Markdown and what's bad about it. Ideally Markdown is as readable in plain text format as it is when it's actually formatted.

cinder karma
#

And markdown tables suck

#

But html tables duck more

ivory shadow
#

Every day I draw closer to rewriting SMAPI's website to use tailwindcss and have native dark theme.

cinder karma
#

And latex tables can go die

ivory shadow
#

LaTeX is like someone looked at RTF and thought "This is great but you know what it needs? More curly braces.

cinder karma
#

I ducked up my brackets in a Latex table the other day and was almost reduced to tears trying to fix it

ivory shadow
#

I need to remind myself that it'd be too much of a pain in the ass to set up a proper web dev environment for the SMAPI website since it's templates emitted by AspNet right now.

tired cloak
#

I'm trying to install smapi on Windows but when I click to install it says that I don't have authorization but I'm already an administrator, what do I do?

ivory shadow
safe dragon
#

maybe this channel should be move into the off topic category tbh

marble jewel
#

It's funny how programming is posed as a topic that only modders care about

safe dragon
#

makes more sense really. The only reason I imagine it's here is cause it's people going off topic in modding channel

marble jewel
#

But I guess it was to steer away all the off topic discussions we used to have in #making-mods-general

safe dragon
#

I'm proof that that's not true

marble jewel
#

Now that we're here, they can probably move it and we'd follow

safe dragon
#

I've never used smapi in my life not to use mods nor to create mods

#

just a programmin nerd

marble jewel
safe dragon
#

yeah I understand how it ended up here

marble jewel
#

The channel has had more active moderation recently

safe dragon
#

but its a bit silly to have a channel with off-topic in the name and have it not be in the category off-topic

modest linden
#

#general-programming

safe dragon
#

I've been on discord long enough to know that people will still always manage to find themselves in the wrong channel even with the clearest labeling in the world

#

but it might still help to move it out of the modding category...

cinder karma
#

Ahhhhh merge conflict successfully resolced!!!!

safe dragon
#

🎉

sand frost
#

Yay!!!

marble jewel
vernal marlin
#

hello 🙂 is this where i can ask for help regarding some modding problems?

ivory shadow
#

Not really, no.

ivory shadow
#

Ah yes, Visual Studio. That function that I famously use everywhere in my codebase that starts with TryGet.

#

Fuck outta here with that extension method linq

marble jewel
#

Thank god for AI Intellisense making us so much more productive

ivory shadow
#

Intellisense is nothing but bangers today

crystal wren
#

I don't know how I feel about the fact that Rider is getting locally running AI stuff like Intellicode soon...

ivory shadow
#

As a programmer, I am not worried about AI taking my job.

crystal wren
#

As someone who isn't one yet but is working towards it, even I'm not worried about that. And I have a huge time penalty working against me!

marble jewel
#

I've been playing around with Jetbrains AI stuff. Not depending in it for most things, other than being lazy writing documentation.

ivory shadow
#

The thing I miss the most about rust was the intelligence of the tooling. I hate how bad the nullish inferrence is sometimes. Like take this:

var data = building?.GetData();
if ( data is not null ) {
    int height = data.SourceRect.IsEmpty ? building.texture.Value.Height : data.SourceRect.Height;

C# is underlining building in the if statement because "oooh spooky it might be null"

#

No the heck it's not

#

Like, I guess, in theory, you could have an extension method on a null thing? But the compiler knows what that method I used looks like too. It's not null.

marble jewel
#

This is not a mess at all, this makes perfect sense /s

var (width, height) = building?.GetData() is
{
    SourceRect:
    {
        IsEmpty: false,
    } sourceRect,
}
    ? (sourceRect.Width, sourceRect.Height)
    : (building?.texture.Value.Width ?? 0, building?.texture.Value.Height ?? 0);
ivory shadow
#

Matt do I need to send you to pattern matchers anonymous

marble jewel
#

Pattern matchers all the things

strange copper
#

what in the tertiary null coalescing

ivory shadow
#

Still not as useful as ?? null

marble jewel
#

?? null!

strange copper
#

null! ???

ivory shadow
#

I have written null! before

strange copper
#

what does that one do 😭

ivory shadow
#

! is null forgiving

#

It marks "This isn't null."

#

So basically you're slipping a null past the nullability checks.

strange copper
#

that feels .... illegal

marble jewel
#

I use that

#

For variables that are initialized on events, but not in the constructor

ivory shadow
#

I find it useful-ish for things in my ModEntry class since you do your initialization in an Entry() method instead of in the constructor.

#

Or in OnGameLaunched.

strange copper
#

it's been bothering me

ivory shadow
#

But you can also do ```csharp
#nullable disable
internal WhateverThing SomeThing;
#nullable enable

#

With as many lines in between as you need.

#

Just don't forget the #nullable enable or I will send the nullability police to your house

strange copper
#

I never actually "learned" C# i've just been writing it as a combination of C++ and Java and googling when I don't know syntax but I just know random stuff like null forgiving is going to come and mess with me someday

ivory shadow
#

I feel like my productivity is way down today.

#

But that's just because I am not angry at a bug for existing

strange copper
#

or at least more relaxing

ivory shadow
#

I dunno, angry coding led to +3764 / -745 over the past three days.

supple ether
ivory shadow
#

Compared to +7300 / -2831 over the past week. That's all the Better Crafting 1.6 stuff.

marble jewel
ivory shadow
#

I'm fond of csharp [MemberNotNull(nameof(SomeThing))] public void LoadSomeThing() { if (SomeThing is null) { // set it up } } too

#

Or if you want something a little more involved than a Lazy<> may I introduce ```csharp
public class Cache<T, K> {

private readonly Func<K, T> Getter;
private readonly Func<K> KeyGetter;

private T LastValue;
private K LastKey;
private bool Valid;

public Cache(Func<K, T> getter, Func<K> keyGetter) {
    Getter = getter;
    KeyGetter = keyGetter;
}

public void Invalidate() {
    Valid = false;
}

public T Value {
    get {
        K key = KeyGetter();
        if (!Valid || (key == null ? LastKey != null : !key.Equals(LastKey))) {
            LastKey = key;
            LastValue = Getter(key);
            Valid = true;
        }

        return LastValue;
    }
}

}

#

Actually why did I ever make it initialize Value in the init method

#

There.

strange copper
ivory shadow
#

Modding like I'm angry

cinder karma
#

My fancy root beer actually kinda looks like a real beer

strange copper
ivory shadow
#

... fair.

marble jewel
#

Modding like a junior engineer sends a PR to a Sr Engineer

#

yes, yes... This looks like it does stuff...

strange copper
#

I sent in some fat PRs at my last position I feel bad for my boss having to review them

safe dragon
#

lgtm approved

ivory shadow
#

I still have to figure out what to do with the Almanac PR someone sent me.

strange copper
#

My boss would approve his own PRs without review so maybe we're even

ivory shadow
#

Like it's cool they wanted to help, but it won't merge cleanly at this point, and I kinda want to go over everything to see what I want to keep / change significantly for 1.6.

strange copper
sand frost
#

I feel kind of bad for sending a 1200 line PR to Casey

marble jewel
#

I don't know what's worse. The big changes or the small ones on the legacy codebase that have somehow been running like clockwork for 2 years without anyone remembering or knowing how to support.

sand frost
#

It does merge cleanly tho

#

The problem is that I’m bad at keeping track of interdependent bugs and idk how to separate their fixes

marble jewel
#

It's like we deprecate "unused" parts of the code, and then a week later we're bombarded by people we've never spoken to coming out of the woodwork because their process broke

#

Scream tests ftw

strange copper
#

there was a relevant xkcd for that one

#

i forget which tho

sand frost
#

Holding space bar