#programmers-off-topic
1 messages · Page 6 of 1
i'll just stick to C#/Swift/Kotlin
it makes a readable sentence!
I'll make em learn haskell first and see who remains
hmmmmmmmm
gotta weed out the weak
I would not have learned to program if I started in Haskell
It took me a minute to realize where there's so many C# programmers here lol
neither would I have
Programming in a few years is just going to be your native (spoken) language compiled directly to machine code
i dont hear much about C#, until I come in here
I'm not really convinced I learned Haskell at all, and I knew at least two other languages first
such a mystery, aquo 
I did all 25 days of advent of code 2022 in haskell and I still feel like I barely understand its basic function operators
fwiw, i don't exactly like C#, but it does its job and makes for moddable games
I like modern C# but it's got a lot of baggage
Is it better or worse than the Lua ternary
do they put it at the end
I like C# better than Java, and I don't know enough nice OOP type languages to speak confidently
oh no, not the Lua "ternary"
Like, i also wouldn't start someone out in Javascript
i still prefer Lua's one i think
they should learn something before they learn crimes
local bar = foo and 1 or 0
what
that's incomprehensible
That's Lua™️
oh I've seen that garbage in javascript before
I've heard people use TypeScript or Julia or such in intro classes
But I don't know either of those
have fun if you want to return a falsish value if the condition is true
local bar = foo and false or true
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
You can do that in JS too I think
you can indeed
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
javascript does have an actual genuine ternary operator though
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#.
hell C# sometimes makes it difficult to even still know what's going on with the memory
yeeep, that always gets you true
great for shoving things all in one line or for write-once and fear touching again code
ternary operators are quite useful I think and easily readable
they are, best not to overuse them though
gotta save those precious lines...
Best not to overly nest them
in an ideal world we wouldn't have null 
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
Honestly I am not convinced my teacher was wrong to start us out in Lisp
Lisp is a path to things the Jedi would consider... unnatural
I should probably try a lisp even though I find it very ugly
See you say that but I feel like I have to be more on top of shit in c#
No automatic smid
love rust's memory management solution but definitely understand why most languages stay away from it
You're able to pay attention to it, but most people can and do ignore it
It's okay, when Nim transcends to it's rightful place, we all can live in harmony
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
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
this isn't a Stardew channel though
I think this channel would still apply
In a real way I feel like the rust compiler has my back
While in c# I feel naked and alone trying to thread
and for Javascript I feel like someone's actively trying to sabotage me
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...
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
Made me think of this (snake, html only) https://grahamthe.dev/demos/snake/
(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.
as unknown as any solves all problems
any 
my current tech stack already includes python and....fuckign labview
I dont' enjoy the idea of writing c code to bridge typescript and labview
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
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
LabVIEW is a write only language
My God j miss being able to right click and see WHO mutated my global
Without my permission
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...
What brought this on?
I love rabbit holes!
But one of them was the custom languages part of the wiki
https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fjwo7ttb1tcsc1.jpeg one of them was this
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
Not as far as I know 
Rust is the cat ears language, right?
Or was that the knee socks?
...both
Perhaps cats can have Rust, then
also esperanto as 1st language?

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.
👀
I am officially in what the shit mode.
8x'd for viewability on Discord, but uhh...
why is there antialiasing on gimp pixels
That's just the thing... there is none (at least in the original). That's the source for the screenshots.
Could something be compensating for an unusual subpixel layout of a monitor?
Yeah, that's the only working theory.
it's very strange
blue doesn't have the issue either
is it some strange type of display panel
regular ol rgb
And it definitely only happens on this one monitor, which is fine in Windows.
So either a display driver or whatever is used to adjust the ICC profile, I guess
So it's clearly not just sneakily running at 4:2:2 or 4:2:0 chroma, because blue is fine.
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
name: amdgpu
vermagic: 6.1.0-18-amd64 SMP preempt mod_unload modversions
Yeah, not some abnormally old version of this or anything...
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
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
...lemme flip my display horizontally in software and see if it's somehow trying to use BGR.
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'
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%?
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
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
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?
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.
Ah I see, so better loading speeds but then again it might help modding?
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.
It’s unlikely Stardew will ever update .NET again
Doing so would drop support for older versions of Windows
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
static interface members would be nice, but oh well
just update to the newest version of .NET smh ppl with old pc's should just upgrade smh
i'm all for it, but you'd have to convince CA
supporting Windows 7 and Windows XP in 2024...
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
i don't remember the last time i've seen XP
also Steam no longer supports either
but there are still other platforms
minecraft just dropped 32 bit support in the most recent snapshot
As of January 1 2024, Steam stopped supporting the Windows 7, Windows 8 and Windows 8.1 operating systems.
32-bit? i assume Bedrock?
nope Java
why would it matter for Java
they updated to some Microsoft branch of Java 21 idk
meanwhile, a lot of devs probably still using Java 6/7/8 out there
has anyone here modded BG3? I wanna try but I’ve been struggling to get it working.
Personally, I'm still solidly for a separate modding branch on Steam that's continuously kept up to date with the latest .NET release, and the main branch remaining .NET 6.
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
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
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
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 
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)
Sure
There are ways, some are easier than others. When working with the underlying data it's probably better to use an IRawTextureData
maybe a little...I realized there was nothing implmented for shirts,,,, but I'm like 85% of the way through
(moving to #making-mods-general but I'll look at your fork)
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
Yes. You just have to deal with hitting thr wrong keys all the damn time
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
This sort of thing is why I refuse to use Mac OS
Don't get me wrong, it's great in a lot of ways. But the ways it's not are super frustrating.
Yeah, I also do this for work (Windows) and home (Mac)
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.
If both machines are you you can use powetoys to rebind keys
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.
I just sort of suffer through windows tbh
Yeah, or ask work for a quick sudo sess to change settings
I use a completely different keyboard though
so I don't really have problems much with keypress muscle memory
Dunno if that is allowed for you
so I guess my tip is "have a poor sense of ergonomics and small hands" (terrible tip)
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
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"
I’d use macos in a heartbeat over windows if I could actually build the pc myself(not counting hackintosh)
you can build it yoursef, it just comes in one piece
it comes in one piece and you pay hundreds upon hundreds of euros just for some extra ram or storage
I like a lot about it, but just wish they catered to power users a bit more
I just wish they didn’t scam you so extremely on upgrades
apple pretending that 256 gb of extra storage costs them 200 euros
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%
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
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
yeah the machine itself is expensive, but not outragously so... until you want more ram or storage
yeah if you get the base model it’s just “very expensive”
if you want anything more
you pay a fortune
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
at least for laptops, the mac minis are pretty comptetively priced
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
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
is there a setting to buried somewhere to have an actually functional normal filesystem…
I turn those off because the way I use my iPad is one app at a time filling the screen
yeah, ive never been thrilled with how iphone/ipad does some things
The design of the two have slowly begun converging over the last couple of years
yes, but its also kinda containerized
Like iPadOS gets a bit closer to MacOS and vice-versa
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
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
Yup
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
We're too attached to CAD software to do anything but windows tbh
I wouldn't mind hiding extensions if we just got away from them entirely and instead depended on headers or something for file formats
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
But as long as extension = file format, I don't think there's any positive to hiding them
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
though that uses its mimetype which is technically separate from its extension
well
that’s how it works on linux
idk about windows
It's the same
I wonder what a file system would look like that only used uri based handlers. Would that be possible.
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…
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
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
someone out there is living in ipad excel
*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
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
Spend five minutes in #archived-modded-support
I sometimes try to be helpful, but then end up muting that channel again
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 
Ipads are super helpful for hybrid teaching
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.
This has given me the fear.
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)
I'm technically a zoomer myself 
'97
the fancy ipods and eventually smartphones started becoming a thing here for me when I was 16 ish
LOL i did NOT expect this to work
i did it for the memes and it actually functioned on my phone
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
wait what do you use?
btop maybe?
termux
btop doesn't seem to be on termux
from what I can tell you simply don't have this information anymore on android...
how did you get the background so dark?
i just got termux and nix-on-droid
so cursed to see on phone
its on Nix-on-droid if you wanna get that
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
nix-shell -p
this nix-env -i thing doesn't seem to do anything
oh huh
do I have to enter a nix shell first
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
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
btop didnt install
im guessing failsafe needs root access
since i see Permission denied
well I ain't rooting my phone so rip
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.
what on earth am I even looking at
this can't be valid code right
regardless of language
the for loop extends beyond its case statement...
Yes. And?
chaos
Switch cases: goto in disguise
i find it funny how something can be both true and false in code
because... why not
I have no idea what this code would even do if it were valid
Every time it is called it returns one number
i do wanna know what language that even is
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
Exactly!
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
They're just gotos!
with some deceiving formatting
Have you seen duff's device?
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
please run a formatter 
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.....)
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
How should i indent this? I feel like it looks bad any way i try, maybe im overthinking it
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
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
if (whatever) {
SetThingy(player, blarg);
} else if (something_else) {
SetThingy(player, frotz);
} else if ....
I like the early returns better tbh
I can see the argument when it actually saves any indenting from not having nested ifs... but it doesn't in this case.
I like matxh stateme ts
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
the first format is mostly used for preventing errors on automatic semicolon insertion, I don't write c# so I don't know if that is the case for it 😅
found a good example: https://stackoverflow.com/a/7259867
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.
maybe you can change it from settings. I remember VS had tons of formatting features that you can alter
Yeah I just haven't gotten around to it; I know you can change your "preferred" style
and lint always exists
...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.
sounds like the parser has too much freedom, but I work with Python so I'm not to complain...
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)
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
Most languages have some form of string interpolation, so I think that's less useful than it may have been in the past
C is not exactly noted for holding the programmer's hand if the fuck something up.
Just doing $"{string1} {string2}" is pretty easy and more clear than strings magically getting concatenated
That's why I'm surprised...
It's not magic... it's just that all of the successors to C forgot to include this really obvious feature.
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
magic is the compiler turning an interpolated string back into a single adjacent run of characters stored in the program binary.
For me it's embedded programming lecture. and I don't miss it that much 😄
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
I'm not sure what you mean here. Are you saying
char* foo = "Hello" "World";
Is valid?
yes
Well I'll be
this man is a skeptic
Also, like I said, useful for portable printf format specifiers:
printf("this is a uint64_t value: %" PRIu64 "\n", foo);
Ok this is literally ISO C standard. I misunderstood your message. Sorry for asking irrelevant questions. 🙂
I thought it was a parser's "feature" 😄
off-topic is the place for irrelevant questions 🙂
Exactly, also for conveniently formatting newlines (when not using raw string literals from C++)
char str[] = "This is line1\n" \
"This is line2\n" \
"This in line3";
(Though I much prefer being able to just triple tick for newlines like Python)
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?
anyone know java script and could join jojo-mart voice?
why?
i need help
yes but why vc
so i can my screen
and what category of js?
sdk 17
general syntax? node? vanilla frontend? a frontend framework?
I just seeing if I'm on the right track
understand the program more
constructors, methods and class making
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)
Love this guy
as I sit there confused why they don't have a dishwasher salt compartment
I basically learned what dishwashers are from this guy (we dont have them here)
The toaster video was great too
you are the dishwasher
penny washes dishes for hours a day
Don’t you hate it when you’re trying to find stuff for your mod and your internet just goes out
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
atra you'll be happy to know I'm finally using CodeMatcher
I'm happy too
What's that if I may ask?
it's a tool to make writing transpilers easier and clearer
Nom nom nom
I really, really, really should get around to that at some point
What's a code matcher, I do all my transpilers by hand like Brainzz intended /s
I'm still using dumb transpilers
This seems very on topic
I literally do all my transpilers (so far) by hand.
Someone go write a parser combinator engine for transpjlerd
Until then
Nom Nom Nom!
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
I don't like single method replacements
I don't know what that is
transpiler-by-xml
What if two mods want do the same thing
I called dibs
c# voodoo
You joke but khloe over there
carefully pushes Theme Manager behind the couch out of view
Fine I'll just jump over you
I think I do in it manually then
I just figured someone put you in the corner for doing something bad
I'm perfect /s
I use my Linux terminal to complete my cpp code at least
Or, more realistically, go "fuck all this shit let me write fun code instead"
"Fun and Interesting code"
(I probably did do something bad, if any of the Nexus comments are any indicator)
if you don't know what a transpiler is then you're not doing them at all
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)));
Oh ok
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
trust me you would know. you absolutely cannot make a transpiler by accident :P
yepppp
I mean, Matt, why should I care, when nom so fun
or the mod description, or existing bug reports, or anything really
Something something monkeys at a typewriter? 😅
Ahh ok, I hope I remember that tool if I ever do
that's why I nuked the aerocore page completely
What's nom
If any other mods on the planet are also patching NetMutex.Update() and ruining my code, I am gonna stab them.
People can read?
nom, eating data byte by byte
puts my stab-proof clothes on
ACTUALLY... /s
Are you patching it in something?
Gonna add that name to my code just cause /j
I'm not doing anything with NetMutex.Update, I was joking
Honestly, I should start making Better Crafting do a harmony_summary the first time a trace log happens.
To see what is being patched
That would be a nice base SMAPI thing
Though some people delay their patches to gamelaunched
Again
I mean like, when my error condition happens for the first time
This seems on topic
I'm too dense to understand this. What is this, #lost-rustaceans or something?
I should make a cpp test mod but eh I got no good ideas and I can't code well anyways
Sorry atra
You're not too dense!
My head is too full of netmutex I can't release it to talk about other topics
It looks like it'd be a smarter way of doing things than the mess I did for my mini scripting language
Really though, is there a way to just make this the default
I wish we had a community Sentry instance.
I can only imagine the server costs though.
Sentry?
I wonder what sunkissed city will be like to mod
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.
would be useful. the other day I asked for a log and someone gave me a google drive link
whatever it is, it can go burn in hell, along with its constant reddit ads
"TiReD oF sEeInG sTaCk TrAcEs LiKe ThAt?"
every. single. day. for. at. least. the. last. 2. months.
and i'm not even interested in Android at all
Wonder if reddit is having trouble getting advertisers
wouldn't be surprised given how they keep flushing their users' good will down the toilet
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
it absoltuely is
Implement FromResidual> on your type to enable do yeet expr syntax in functions returning your type.
ah yes one of my favorites
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
yeahhhh
Positives: Money!
Cons: 
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
My friend who does rust reports the same 😔
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
I actually had a good reason to use rust, too- I wanted to be able to add it to Godot as a native extension that could be used with all versions and not just the .net version
I've been in pythonland a lot recently, where using Rust with Maturin is a decent strategy for "why so slow code?"
I like Rust, but at the same time it can get in your way even in situations where you don't really need it
when I go to indeed and search "rust developer" as job I get 3 .NET developer jobs as my first results
I mainly use it for wasm now lol
yeah rust is good for wasm
not a whole lot of other languages out there with a mature wasm build target
as long as you're prepared to not use a bunch of the std libs anyways
That's the kicker
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
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
is it a remote job??
"at most 4 days remote a week"
weird
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
how many days are in your weeks?
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)
think atra means alternate weeks??
no, that's the joke lol
oh dear
atra, maybe you deserve the melting emoji
I can take it off my name if you need it 😛
nah, atra will live
I've found literally one Rust job locally...
incredible how every rust job requires years of experience in rust
where exactly would I start
I looked into super smash bros ultimate modding at one point and it used Rust I think
At least a few years ago
unfortunatley I don't think smash bros ultimate modding is gonna pay my bills
Just need to become the #1 most uber-popular mod for it, then it might pay one of the bills.
apply anyways
yeah that's pretty much what you gotta do
I don't think this is the correct type of developer
I like how neither the job role nor company gives an indication of which type of developer it is
that sounds fun
Ah, a kernel developer
I'm mostly unqualified for that
belive in yourself!
I do not have a degree in food science
I have many degrees, but that isn't one
not unless food = math these days
yes but you have been making food for yourself for more than twenty years so
nah, mom still makes hot dogs
my mom thinks hot dogs are not good food
your mom is probably right
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...
which direction lol
the good one
oh thats good
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
github has never been slow to me but idk if there's a "new" github
how new is new github
I'm not sure I even noticed
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
Do you know the github secret
is the page open now
?
I'm viewing github rn
oh that secret
I pressed period and it was done loading in roughly 5 seconds
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
I use a terminal basically for everything in git, except for merge conflicts, where I just use VSCode
Vscodes merge conflict resolution gui is so good
I'm not sure if it's actually good, but I really hate those three way split programs
Woah
I don't use vscode on this laptop for anything
It's neat huh
Yeah, we use one of those at work for Perforce and... ugh...
It turns out I did not know this secret. What does it do!? 
<insert another rant about perforce>
It's nice for when you want to find soemthing without cloning it down
🤫 time to find out
I'm vaguely gesturing towards being only on my phone right now.
||it seems to open a text editor? didn't work for me||
even when I use a terminal code editor I use a gui for git stuff(lazygit in that case)
It's a shortcut to the... github.dev trick? Neat!
I use git command line
why merge branch when coworker can merge branch
I used the command line for most stuff but I hate merge conflicts
I use the git cli on my home server dev environment cause I can't be bothered to install lazygit on debian
Huh, I've never seen lazygit before
it's alright
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
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
is the server based dev environment just for compilation times
what do you mean
why develop on server
cause I'm away fairly often staying at my mom's
where I'm on an ipad
I ssh into the server
to develop
with neovim i assume
yes
i see
it's how I did advent of code last time
.g splunk development
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
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.
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
Which translations are you specifically talking about?
all of them lol
sorry, I more meant of where on the UI, which translations?
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
ahhh, ok, got it, makes sense
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
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?
on topic, as in, should be in a different channel?
I posted here just to be on the safe side
(seeing as it's not about programming, and is about... well, either making mods or using mods, in a meta sort of way)
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
that's definitely a joke
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
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
ah well that's not quite the same as the alarmist headline
that's enterprises paying microsoft for extended support on legacy software, not a required subscription for individual consumers
yup
yes
cool
null is null and "" is just a regular zero-length string
Thats why isNullOrEmpty exists
yeah but it's slower than just doing str is null || str.Length is 0
and not much simpler
true
imo using the one function is easier than writing both those
idk if that'd work in csharp
looks like python
even python doesnt do that though
Think so too
Thus feels like something that would get inclined
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
oooooooooo
but I've done things like num is 4 or 8 or 19 before
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
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?
yes, why wouldn't it?
= default only sets the initial value
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
well you can put logic in the setter to do that. one sec with an example
oh! that also would be great
Wdym?
the contex is secretly on-topic
public string MyProperty {
get => myValue;
set => myValue = value ?? myValue;
}
private string myValue = null;
but it turns out the game super hates it when objects don't have descriptions
don't ask me why some content packs are adding objects that don't have descriptions
the only time default isn't null is when dealing with structs and other non-nullable value-types
yeah, I changed the default to "" though and it didn't help
Huh
secretly all my C# questions are related
Default it to "no description"?
I was hoping the empty string would just leave a weird space in the tooltip
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
yeah, I would do a null check in the setter
maybe I just null check in the data reading step
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
ah, i seee
you can also do value ?? "" instead if you want null to still be set, but turned into an empty string
yeah that seems good
I use String.isNullOrWhitespace because users have broken too many things by putting spaces in them
Holy URL, Batman
vs
it is inlined. I expected that.
what I don't expect is the extra manipulation at the top
I ended up using a space in the end
it's also weird that doesn't have a ret
oh looking at the actual page it is there, it just has some weird jumping and an extra push/pop in there
Otoh I doubt it is gonna be a noticeable performance issue
Still I expected identical assembly tbh
I wonder why. Looking at the C# code behind IsNullOrEmpty it's the same beyond use of == instead of is
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
is there a good turtorvial on how i start to made mods til stardew, i have never made mods before
uh idk #making-mods-general is probably the place to ask
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
Past atra hates current atra hates future atra
No wonder I have mental health issues
git removes every piece of whitespace from the file
We were digging through smapi image editing code yesterday
And I was very surprised to see the last commits were two years ago
2 years, that's a whole feature version of SDV ago
The Killers and this overpriced root beer are gonna get me through this merge conflict
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?"
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
I also forgot my personal vimrc on this machine
So things my personal vimrc handles (like allowing :Wq) aren't on this machine yet
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
Hahahha
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
the worst part about DNS is you change something, but everything continues working for like 12 hours
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:)
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
HTML in markdown is valid markdown though.
I'm using HTML tables because you can't do colspan in GitHub markdown tables.
Yeah, I'm just talking about the pure markdown table syntax though
Oh yeah, it's definitely not great to write.
Which I don't even know if NuGet supports that
Maybe! I didn't bother testing.
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.
Every day I draw closer to rewriting SMAPI's website to use tailwindcss and have native dark theme.
And latex tables can go die
LaTeX is like someone looked at RTF and thought "This is great but you know what it needs? More curly braces.
I ducked up my brackets in a Latex table the other day and was almost reduced to tears trying to fix it
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.
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?
This is not the right channel for that. You're looking for #archived-modded-support
maybe this channel should be move into the off topic category tbh
It's funny how programming is posed as a topic that only modders care about
makes more sense really. The only reason I imagine it's here is cause it's people going off topic in modding channel
But I guess it was to steer away all the off topic discussions we used to have in #making-mods-general
I'm proof that that's not true
Now that we're here, they can probably move it and we'd follow
I've never used smapi in my life not to use mods nor to create mods
just a programmin nerd
Yeah, but it was more like #making-mods-general was unofficially #programmers-off-topic when it was not being moderated
yeah I understand how it ended up here
The channel has had more active moderation recently
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
#general-programming
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...
Ahhhhh merge conflict successfully resolced!!!!
🎉
Yay!!!
The Killers + Overpriced Root Beer: 1
Merge Conflict: 0
hello 🙂 is this where i can ask for help regarding some modding problems?
Not really, no.
If you need help using mods, you want #archived-modded-support. If you need help writing mods, you want #making-mods-general .
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
Thank god for AI Intellisense making us so much more productive
I don't know how I feel about the fact that Rider is getting locally running AI stuff like Intellicode soon...
As a programmer, I am not worried about AI taking my job.
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!
I've been playing around with Jetbrains AI stuff. Not depending in it for most things, other than being lazy writing documentation.
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.
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);
Matt do I need to send you to pattern matchers anonymous
Pattern matchers all the things
what in the tertiary null coalescing
Still not as useful as ?? null
?? null!
null! ???
I have written null! before
what does that one do 😭
! is null forgiving
It marks "This isn't null."
So basically you're slipping a null past the nullability checks.
that feels .... illegal
I use that
For variables that are initialized on events, but not in the constructor
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.
oh maybe I should do that cause I just let the compiler warnings slide
it's been bothering me
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
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
understood 😭
I feel like my productivity is way down today.
But that's just because I am not angry at a bug for existing
surely peaceful and non-angry programming is more productive right
or at least more relaxing
I dunno, angry coding led to +3764 / -745 over the past three days.
I do wish c# had kotlin's lateinit
Compared to +7300 / -2831 over the past week. That's all the Better Crafting 1.6 stuff.
We just Lazy all the things
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.
Modding like it's a full time job
Modding like I'm angry
My fancy root beer actually kinda looks like a real beer
Just like a job fr
... fair.
Modding like a junior engineer sends a PR to a Sr Engineer
yes, yes... This looks like it does stuff...
I sent in some fat PRs at my last position I feel bad for my boss having to review them
lgtm approved
I still have to figure out what to do with the Almanac PR someone sent me.
My boss would approve his own PRs without review so maybe we're even
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.
Find a formatting thing to disagree with, set it to wait for author, then never reply again /j
I feel kind of bad for sending a 1200 line PR to Casey
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.
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
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
Holding space bar

