#programmers-off-topic
1 messages · Page 18 of 1
@cinder karma
For simple values, looks like ref is faster, but that's probably just because of the StLoc instruction
Ever use BenchmarksRunner? It can gather statistics and report memory allocations.
if it's c# then no, I mainly use python and c++ at work
Obligatory mention because it's something Nick Chapses uses in every one of his videos
But super useful and easy to use
Oh, I wonder if that's the package he uses
Rider has its own benchmarking built in for memory at least, I use that to profile my memory
That's a surprising difference
it's at 1bn iterations, so maybe not too important ig?
Idk, it all came up bc I'm so conditioned to pass by const ref in c++ if I can, and c# just kinda does stuff
it's interesting to me that static ref vs static ret has a larger spread than instance ref vs instance ret
At 1m iterations it's pretty much the same (excepting a 1000x factor)
Static Ref Finished. Time: 25827 ticks. Num: 2000000
Static Ret Finished. Time: 35588 ticks. Num: 2000000
Instance Ref Finished. Time: 34865 ticks. Num: 2000000
Instance Ret Finished. Time: 34429 ticks. Num: 2000000
still crazy to me how close together the instance versions are vs static
Benchmark dotnet + linqpad is great.
I do almost all my C# performance testing that way.
(Just remember to use .NET 6 if you go that route, so you're testing against the same runtime as the game.)
Huh
Maybe the return
this mainly came from me wondering if a LdLoca.S instruction and passing to a function with a ref arg was faster than a LdLoc.S instruction that returns, then using StLoc.S
Honestly I would expect all that code to replace your method with a single add instruction
ldloc
add
stloc
Can you (a) dump the raw assembly and (b) try putting a return on the refs
just like...a blank return?
Linqpad seems to be using an add as I'd expect.
A method as simple as return input + 2; is absolutely getting inlined.
Yeah
I might be building debug mode actually, one sec
Same with RunTestStaticRef
Testing on my machine: Static Ref Finished. Time: 212ms. Num: 2000000000 Static Ret Finished. Time: 212ms. Num: 2000000000 Instance Ref Finished. Time: 212ms. Num: 2000000000 Instance Ret Finished. Time: 211ms. Num: 2000000000
did you use any different compile options?
yep I was building debug mode
Static Ref Finished. Time: 224ms. Num: 2000000000
Static Ret Finished. Time: 217ms. Num: 2000000000
Instance Ref Finished. Time: 215ms. Num: 2000000000
Instance Ret Finished. Time: 210ms. Num: 2000000000
my question still stands though right? It wasn't about inlining the add, I just wanted to see if it was faster to use a ref vs a ret
like if I was using harmony, do you think it'd make a difference?
I feel like this would be something that is incredibly not the actual problem tbh
And incredibly dependent on what the jit decided
Static Ref Finished. Time: 1287ms. Num: 2000000000
Static Ret Finished. Time: 1493ms. Num: 2000000000
Instance Ref Finished. Time: 1475ms. Num: 2000000000
Instance Ret Finished. Time: 1287ms. Num: 2000000000
weird lmao
Strictly speaking, what do you think the resulting IL would be that it'd be significantly difference from a performance perspective?
You are in effect:
- Loading a local onto the stack
- Doing something
- Setting a local from the stack
Nothing wrong with testing things if you're curious. That's how you learn.
I've certainly benchmarked some stupid stuff myself.
Just make sure not to chase the wrong things when you're optimizing. You can waste SO MUCH time that way.
😈 Don't listen to them. Just one more tiny optimization, and it'll all be worth it
my only experience with c# has been through modding lol
my work is mostly with c++ so for me it was a question of why not use ref for most things like I would in c++ with const ref or const ptr, since those actually can have a noticable performance difference if you're passing by value and accidentally copying vs passing by reference
still not very used to the JIT aspect of the language
Yeah, I imagine it must be quite a thing coming from a lower level language like C++
you're not wrong lmao it's one of my bad habits, I'm really bad with prematurely optimizing shit I shouldn't and I think too much instead of just doing it
It's mainly bc I know the c++ rules, like if I pass a std::vector as value, it'll be copied which gets expensive, but if I pass a List in c# it's automatically passed by reference behind the scenes.
So I guess I assumed there were similar rules saying when it's absolutely correct/incorrect to use ref, but I suppose it doesn't matter as much
Lists are always passed by reference in c#
that's what I meant
There are rules around this, look up "should I pass this struct by ref"
like I don't explicitly have to say it's a ref like I would in c++
But, like, four bytes is teensy
my gf said 4 bytes is average sized 
was I supposed to find the csharp reddit thread? All the top stuff is c and cpp
Ummm actually I'm thinking of a blog but I don't recall howwww I found it now
I've been thinking about this and I agree... how do you do this? motion sensors would be enough, but what if you're sitting at a desk and stop moving?
all that stuff is c with no pp, and I want the pp
One guide I've seen uses BLE as a proximity sensor. You need multiple of them throughout your house, but whichever one has the strongest connection to you determines your location
This requires you have your phone or other device on you like a smartwatch
Lookup BLE Beacon
interesting. is that energy efficient? I'd worry about having a ble connection on all the time on my phone
The LE in BLE is low energy
.img thinkies
it'd be neat if buildings came with weight sensors in the floor everywhere
that'd work really well and be very accurate
Sounds like my bachelor thesis project, we did BLE beacon based detection to control audio playback with multiple speakers all around a home
I still have like 50 Bluetooth beacons laying somewhere around, waiting to be used for something

@brisk cloak Hey there, please don't ping CA unnecessarily!
We were considering RF badges
Yes you'll need to remember to wear it
But you sure will remember when the AC ignores you
Interesting project
looks handy
I'll have to check that out
it's very useful, would recommend
Does anyone have a recommendation for a work-oriented instant messaging system such as Slack or Teams? Haven't heard great things about Teams and not sure if Slack is still decent or not.
This would be used at a small company, so don't need anything crazy enterprise
The honest answer is they all kinda suck, but if dealing with something that your company actually relies on, I would just pick one of the big players and not have to worry about uptime or anything
I completely agree
Slack had a finished product years ago but is a large tech company and so has still been releasing new features for years.... it's fine, my biggest complaint is that the UI is laggy
I can guarantee no one liks Teams
But hey, it always seems to be online, as much as it ever is
Hate Teams
no lag experience for me with slack
the only complaint about slack I have is that its video calls seem pretty unreliable
tbh I run slack on some insane 4k euro workstation laptop
I'd hope it doesn't lag
Would those of you that have experience with both say that you prefer Slack over Teams, then?
I prefer the Slack interface
Having to pay them is annoying
(For school clubs, etc it doesn't make sense to pay them but the free tier isn't great)
I preferred Slack back when we used it, yeah
I use Linux for all my work and the teams experience is absolute garbage, MS basically doesn't care about it
Yeah so you set up Let's Encrypt and fuhgettaboutit

do you host it yourself? Do you have a hosting provider?
like what kind of certification thingies
how to install them?
I'm told when hosting something on my home network, to not actually just do whatever.home as the address
that if I have an actual domain with an actual wildcard certificate
I can do whatever.example.com
and it'll actually support HTTPS
letsencrypt doesn't offer wildcards afaik
but yes, you can letsencrypt any number of "subdomain.domain.x"
and even if im just accessing them over my network magically HTTPS will work?
if you use something like nginx or apache, there's automated tools to do the generation of certs entirely for you
LE does subdomains now, but yeah last I checked not wildcards
I ask because theres a few things I want to self host that insist on being over HTTPS and not just HTTP
and ive never gotten that to actually work
yes, the LE root / X1 cert is bundled with most OS and browsers, so it's by default trusted
I use caddy as a reverse proxy. For the stuff thats actually accessible over the open web, HTTPS works magically, but for local stuff its always had to be http
the way it works is each cert has a field for it's CN or common name, and that gets set to the name of the website. When your browser accesses the website, it verifies the cert AND checks that the CN is who it claims to be before declaring it valid
this is a bit of a simplification, but it's close enough for this applicaiton
I have an unused domain sitting around, whats the best way to get it some subdomain certifications
do i actually have to run a basic webserver so the requests go thru
its not the end of the world if i do
is it a static site? nodejs? watcha workin with here
The stuff I actually want to have HTTPS support would be selfhosted stuff on my local network. Jellyfin. Home Assistant. Vaultwarden maybe but maybe not. For Jellyfin and HA, I've just set up a DNS redirect rule thing to accept like jellyfin.home and that's been fine. But it's always been over http
I don't use caddy much. I'm aware of it, but I usually use nginx or traefik...
Looks like they have an out of the box setup for both filesesrver and reverse proxy, you just have to set up the host match
https://caddyserver.com/docs/quick-starts/https
So if I own example.com
and want jellyfin.example.com to be certified
I would... something
I would abuse the DNS system is what I would do
The one I'm actually looking at is called Linkwarden. It's a bookmark manager thing. The web UI works fine hosted on the network over http, but their browser extension refuses to authenticate
I assume because its not https, but idk how to make it https because I dont actually want to expose the thing
I do have my vaultwarden instance self hosted on my local network with cloudflare. The IP for the dns configuration used is the tailscale ip...
what do you mean self hosted with cloudflare
it's only accessible on my local network but I have like warden.domain.com to access it through https which I set up with cloudflare
goes through tailscale
I see
like a cloudflare tunnel?
you'd need one of two things:
-
example.comto point to your home network. This can be accomplished manually by getting your external IP from your ISP and setting it to the A/AAAA records, or by setting up DynamicDNS, if your hosting provider supports it. Personally I'd recommend DDNS since it's less of a pain and does its thing automatically. Now any request toexample.comknows that it should access your home network.
The drawback of this is that you're exposing your home network to the outside internet, which always has its security risks. You want to make sure that everything is as locked down as it can be, and that you keep things up to date to prevent exploits.
Additionally, it can always help to put your home services behind something like a free CloudFlare tunnel. I don't particularly like CF as a company, but you can't deny the value -
A manual route set on your home computers / home dns server if you have one. The drawback of this is that you won't be able to use the
example.comroute from outside of your home network.
The drawback of this is that you're exposing your home network to the outside internet
This is what I've been trying to avoid. I was under the impression so long as the wildcard domain pointed somewhere I could use any subdomain with impunity
If you want your jellyfin to be https, you need to do the setup for jellyfin https (not sure off the top of my head), and have caddy set up to auto https the reverse proxy. Caddy (from what i read in the docs) will auto generate a cert using let's encrypt for the host you provide
since what warden.domain.com refers to is my tailscale ip which means absolutely nothing to any device not using my tailscale vpn it's at least from what I think still not accessible outside my network
Yeah, and I do have tailscale set up
I could do that
Ideally I'd like for it to be a domain I actually own tho
as the wildcard domain pointed somewhere I could use any subdomain with impunity
This is correct from the DNS perspective, if you have a public DNS server that recognizes that any*.example.compoints to your public ip123.456.789, it can redirect any subdomain there.
You still need certificates for every subdomain, though caddy should be able to do that for you if you configure it correctly
So I do have a webserver (the one governor runs on), could I just point it there and not expose my own network?
yes, or only expose tailscale on your network and have all connections go through there like @safe dragon does, from there a reverse proxy can connect you to whatever services you need. Or use any other tunnel provider
hmmm
you can split the logic into sections
Computer ---- lookup jellyfin.example.com -----> DNS Server
Computer <---- *.example.com is at 123.456.789 --- DNS Server
Computer ---- I'm looking for jellyfin.example.com ----> 123.456.789
Computer <---- Here verify my certificate that proves I'm that domain ---- 123.456.789
Computer ---- Ok, let's connect ----> 123.456.789
Computer <---- Proxied connection to jellyfin subdomain ---- 123.456.789
(again this is simplified but functionally correct-ish)
this doesn't include logic for a tailscale vpn connection or anything like that, but it can happen inside the connection step
or technically the https gets forwarded to the application that's proxied, but it depends on the application and how it handles this stuff
So I understand how it would work with tailscale (if not exactly how to set it up) but I guess it wouldnt work with using any old computer as *.example.com. Because when my computer goes to look at jellyfin.example.com, the certificate is at 123.456.789, but the service itself is only available on the network at 192.168.0.1, so it will have no idea how to look somewhere else for the certificate
if that made sense
I can use tailscale, that could work...
I did not know that existed
Excellent
I tend to turn off tailscale when I'm not using it, but I'm not sure if there's any reason to do so. I think traffic only goes thru the tunnel if it's actually directed at the network iirc
I have it on basically permanently
I just dont want to route all my laptop's traffic back home when im out
you can set up an exit node so that it does route all your traffic through that
but
as far as I can tell it doesn't touch anything beyond addresses related to your tailscale network
I just googled Tailscale HTTPS
I could probably just cut out the need for cloudflare at all then though I still want to use it for other stuff so there's not much of a point to change it now
How did you set up the warden subdomain for your tailscale then?
warden.example.com -> tailscale entrypoint most likely
yeah
when a request gets in, Tailscale can see the hostname that was asked for and direct appropriately
you could have 100 domains like example1.com example2.com and all have them point to the tailscale entry and route them accordingly
the name is just a name
Thats done at the A/AAAA thing level
you point all the domains to the same entry point with A/AAAA, yes
if we're talking about *.example.com, that's just 1 A/AAAA record
I only know enough networking to be dangerous
me too
I mean I do partially write webservers for a living but actually running the servers ain't my job
we'd be in a lot of trouble if it was
part of my job is making tools to interact with a lot of encrypted/secured connections so I've had a bit of exposure to it
I have tailscale for all my self hosted services. My reverse proxy only routes my subdomains to my tailscale ip so nothing is available to the public internet.
Works well for me, even for streaming video when away from home.
I’m using traefik as my reverse proxy with domains on cloudflare to get ssl certificates.
Ars had an in-depth tutorial recently on something that seems related...
https://arstechnica.com/information-technology/2024/03/banish-oem-self-signed-certs-forever-and-roll-your-own-private-letsencrypt/
But it did require distributing a cert to all of the clients to recognize your internal CA, which is not exactly ideal. (But it does let you cut out any reliance on a third party, if that matters.)
me: an inordinate number of bookmarks in my bookmark bar
what do you all access from your local network when away from home?
tailscale looks cool but I've never needed to do that
for me, pretty much everything is locked behind tailscale
accessing the smb drive and accessing my password manager are the main ones though
Oh dont get me wrong, this is a "spend hours setting up a system I'll use twice" kinda thing. I've access my network shares and rarely home assistant away
but I can
🙏
The learning curve takes time, but I think it's worth the effort. I can probably setup a server with tailscale in under an hour now.
esolang but the syntax is loss
i am satisfied just knowing someone already did this 
Hello, i was wondering if theres any modders are down to take a mod commission? Or if theres a better place for me to ask than here

!commissions
If you're looking for people who do mod commissions (either art or code), here's a wiki page with a non-comprehensive list of people who do them: https://stardewmodding.wiki.gg/wiki/Stardew_Mod_Commissions
Thank you so much
hmmm there should be a server for commissions in the discord to see who is active and all. Like the Rimworld Market Place Discord server. That'll be cool

Can someone please find the "how to pass this variable into a function decision tree for cpp"
I recall it being hilariously overcomplicated
(Don't at me and tell me Rust is kinda the same I know 🙈 )
You have ascended
Related to the "why would you need to use TRIM" discussion the other day, came back to work and discovered 2000 lines of data had been booted from our software last week, and we just discovered the cause was people putting in two nine-digit numbers in a field that is expecting 15 characters max.
Why are they putting in two? I don't know and I have a feeling I would be displeased with the answer.
Anyway, I'm putting a trim on that field before next month's data upload.
Just need to say: I hate software licensing. And legal stuff in general.
(I am looking over examples of source included style licenses right now as I prepare to re-license all my mods specifically because of Curseforge.)
my esp32-c6 has arrived
boy the arduino IDE sure has changed
god it sucks
they made it an electron app and I think just didnt bother to add some of the old features
what mods you make?
and now its frozen trying to open the command menu
holy shit
guess I'll try their CLI tomorrow

Almanac, Better Crafting, Cloudy Skies, Giant Crop Tweaks, More Nightly Events, See Me Rollin', Theme Manager.
The mod that has me needing to change my license is Better Crafting, since Curseforge seems to think the source license means they can ignore my wishes for builds.
oh! i forgot you made stardew mods
been playing to much MC forgot about modding stardew
why not move to another hosting site?
That isn't the problem. I am happy having my mods on Nexus. The problem is that Curseforge is letting people upload at least one of my mods without my permission.
Very typical Curseforge behavior tho
this is the first im hearing about them letting people do that
I too don't like the new Arduino IDE. Though I never used the old one, I just also don't like the current one. lol
i mean, im all for CC and MIT license but like... you cant just do that to someone who works hard on something
(I mean wasn't that part of why the Minecraft community decided to leave and make their own platform?)
idk, i did hear something about curseforge but i never looked into it
that would make since though
OH YEAH, off topic but do yall know any good free PBR software, trying to do a labPBR pack for MC but cant find any, so ive resorted to gimp(which works fine but id like a app make for labPBR specifically)
what would the program do
idk what labpbr is
the standard answer for doing anything related to creating assets for use with a pbr lighting model is stuff like blender and substance3d
if this is for minecraft I suppose maybe only substance3d
Oh I should probably make sure nobody is doing that with one of my mods
LabPBR is the pbr encoding format agreed upon by the mc shader community. It is minecraft-specific, and the actual visuals / feature support vary by shader.
It's not a "standard" in that there's no enforcement or requirement, but there's a spec on github, and before it got made every shader just kind of had its own format, which was horrible.
Never used a shader before but I can feel the format issues in my soul
can't be worse than the gltf spec
I switched HHS to MPL-2.0 for v3 specifically so that if someone goes and distributes the ZIP they have to either provide the source or link to my source. And I set up the license to be bundled into the ZIP, so no excuses.
That's a nice side effect of the main reason, which was so that the source always stays public for the modding community
I believe DH did the same with their mods
imagine having projects worth stealing
I doubt anyone would bother with mine given the numbers it's (not) getting, but the peace of mind is nice. Also if I stop maintaining it at some point it's still fairly permissive as long as the source is kept public, so someone else could reasonably pick it up.
I made it more for me than getting numbers, though
It seems like RISC ISAs might finally be becoming real with Apple silicon, Windows on ARM, etc
As much as I think AMD is finally doing a decent job of giving Intel some competition, a whole market of competition would be better
tbh in the cpu space it's more a question of whether Intel can stay competitive with amd
they've caught up mostly from the initial gap after the original Ryzen processors but they still suffer from some of the same issues that has plagued them for generations
Yeah they're going with chiplets now so that will probably help them catch back up. AMD has been eating Intel's lunch in the server space, but for desktop Intel is still what most people view as the standard thing to go with, unfortunately
It's kind of nuts how much more efficient AMD's parts are these days than Intel's
Intel still wins in name recognition
though amd fared better than they did with their Athlon lead back in the day
honestly, motherboards have gotten so expensive in recent years that the price of the cpu isn't as big of a factor anymore...
Yeah, and that all comes back to more competition being needed
Intel and AMD are basically the only game in town for x86-64 due to patents and such
and compiling for risc-v is much faster than x86...
probably cause x86 is a very large complicated spec with a billion instructions
I would think that if something has an ARM version (which is also RISC) then it wouldn't be too hard to make a version that compile to RISC-V. It's just a matter of getting software to start compiling to more than just x86 by default
It seems like we're on that path, though
I think thats a lot easier said than done
Yeah I just mean things like .NET supporting more multiplatform things and with stuff trying to run on both desktop and mobile you kind of get that already
Fortunately none of my mods are apparently worth stealing despite my enormous ego
It's insane how the prebuilt gaming pc market is still dominated by Intel even though AMD has been basically obliterating them for the last few years.
I guess the whole "intel inside!" campaign really worked, huh?
Prebuilts are such a scam
Anyone that's looked at benchmarks in the last couple years should know better. The X3D parts are not even in the same league as the top Intel SKUs (as in they're in a higher one), unless you love burning double the electricity
I have a pile of parts from black friday still sitting here waiting for me to put them together, 7800X3D included lol
That's exactly why I switched to that license! LGPL also did that job, but it also has some... baggage.
People see GPL and just nope out
my desktop is a prebuilt I got with my first COVID stimulus check in 2020, and the CPU cooler busted shortly over a year after I got it, necessitating a $300 repair and mailing it back to Dell for a few weeks because they used proprietary little screws no one else can work with
great times. great times
My current pc I built myself in 2019 and I couldn't be happier with it. Maybe it would be nice to have a better gpu but the one I have is good enough for 99% of things
I couldn't afford the premium of having a small business build it for me (was in grad school, still in grad school, prices were crazy at the time) but my next rig will be of the "custom build that supports a local computer shop" variety
yeah i'm very comfortable having a midrange GPU
i have a PS5, my desktop has a hard disk for steam installations, I won't be playing the eventual steam release of ff16 on here anyway
I haven't bothered to put it together yet because I've just been playing Stardew, not exactly demanding
Is ff thr only game you care about
dhjsjdjsjsj no, but i would say it's my main squeeze
Tbh I've never wanted a GPU before now but <redacted cad software> can <redacted swear words>
i've been pursuing a doctorate for five years, the limited time i have to game tends to go towards stuff i really love
once the ffrecipes mod is done it will be on to zelda recipes
My current build is literally from 2008
I play modded minecraft, which definitely uses my boost clock to it's fullest extent
i7-920 OC'd to 4.0GHz, which is the only thing that has kept this viable for so many years
Oh damn 4ghz is insane for 2008
i started playing p3p over the holidays and enjoyed enough of it that i went and bought the other persona games available on steam (and... acquired the psp ports of the early ones) for when i eventually can get back to it
It's like 2.93 or something stock. This was back when Intel parts had actual headroom
These days it's just power inefficient to keep running it though and I'm starting to feel it
16 years is pretty good though
I tried overclocking but wasn't able to get much out of it before it destabilized. I also tried undervolting my gpu, which I could push quite far before destabilizing, but I barely got any performance uplift out of it
I guess that only does something of thermals are a problem
Not much to get from OC'ing anymore, but I guess that just means things are "factory overclocked" and keep the warranty intact
Intel certainly is factory OC'd with its recent instability issues on the last few gens of CPUs
LMAO
Still, I can't complain. It still runs strong and is more than fast enough for anything I actually use it for.
Minecraft has chunkgen lag problems still with lots of mods installed, but considering it doesn't slam my cores it's probably a memory/disk/thread sync problem
Their IDE sucks, but the arduino CLI isn't half bad
It most definitely has to do with all those that’s why optifine or other optimizations mods usually only have a slight boosts in large mod packs unless optimized for the entire mod list which is usually only seen in large mod packs
Used to try and play with 200-300 mods and it was absolute chaos, but definitely doable
Hi loves! With the Nexus Mod Description bit, is it possible to use a background like this one, which I found on a colour website?
<style>
body {
width: 100%;
height: 100%;
background: linear-gradient(-60deg, #FF6BAB 15%, #FF52FF 32%, #2626FF 61%, #00D5FF 85%);
background-size: 200% 200%;
animation: ani_gradient 5.8s ease infinite;
}
@keyframes ani_gradient {
0% {
background-position: 0% 0%;
}
50% {
background-position: 100% 100%;
}
100% {
background-position: 0% 0%;
}
}
</style>
Like, I tried with the BBCode thing, and it didn't work, unsuprisingly!
I haven't touched it recently, but I doubt it. The BBCode stuff is pretty lacking in features. You'd probably need to use an animated image.
I really hate that you can't even add alt text to images with BBCode. I know that, reasonably, it's not like the game is probably accessible to people who need screen readers, so why should the website need to be accessible, but as a web dev... I hate it.
supporting alt text on images is below table stakes at this point. i think you'd have to go out of your way not to support it
Thanks though, Khloe!!! You are the best!!!
there's a mod people have worked up to make stardew accessible for vision-impaired/blind people, iirc it doesn't get 100% of stuff but it's brought a noticeable increase in people interested in accessibility in from what I've seen
oops I'm getting on topic again aren't i
but some of atra's mods had people commenting on them re: accessibility since the minigames often translate poorly over audio
For the record: "why do none of my edits to this configuration file work? Let me introduce a known syntax error.
Oh fuck"
Is just about the worst
I, for some reason, usually go look up the preprocessor #error directive when I want to do that (because I never remember, and it somehow seems better than typing garbage and assuming it will be a syntax error)
a bit late to this, but Minecraft usually prefers faster cores vs more cores. Some of the chunk-gen process is multi-threaded as far as I remember (it's been a year or two since I modded it), but largely the generation of terrain only has one thread per dimension.
So it wouldn't be hitting a multi-core machine very hard in that department, the real performance comes from how fast the thread can finish a chunk and spit it out
Grah
even a minecraft server is almost entirely singlethreaded
Gaming performance in general prefers faster cores vs more cores
The team behind the server software Paper have been working on multithreading the server logic for a while now, they came out with a custom server called Folia last year which is promising
Yeeees I'm aware of that but even when I look at core-by-core usage none of them max out, which is why I suspect the problem is something else. Like even on the busiest core I'm only getting like 70-80% usage, even on high priority. Maybe windows's scheduler just sucks?
I have no proof for this but I generally think so. Especially when I'm compiling on windows vs linux, windows will never max my CPU while Linux will let me crash my computer if it means my code compiles faster
but also I know all the correct flags to set on linux, so maybe it's just me
I have been able to slam my cpu hard enough to max all of my cores and get frame drops on the desktop but only rarely. I don't remember what exactly I was doing to do that.
yeah I saw
I've used paper to do async chunk generation for plugins which has been pretty successful
you can't rely on it to completely populate the world, but to get chunk information it's very helpful
Maybe windows's scheduler just sucks?
i hear it does (preferring cores 0 and 1 and rarely using later ones; this is why setting stardew's processor affinity to a specific core >=2 can help performance for some players), but that may only barely be related
I'm always wary editing things like processor affinity or niceness, etc. It's dabbling in things mortals weren't meant to mess with
Uses first free, so yea preference on Physical Core 0, vCPU0 and vCPU1
With hyperthreading not all threads are neccessarily equal speed, depends on the actual hardware, eg with CPUs supporting boost you actually have a boosted thread and an unboosted thread So every even one (0 2 4 6 8 etc) is faster than every odd one under that config
mileage may very depending on architecture, above is relevant to old intel (pre gen8) and xeons
not sure about the windows "nice" or priority implementation but "nice" in linux or setting ulimits works best when restricting not speeding up
The intent is for something to "play nice" ie scale back consumption to free it up for other things to use "me first" configurations with nice can be disruptive to system processes if resources arent available (they now get queued)
Eg if a filesystem scan or caching process is occurring and you need a process to get better access to IO, slow the scan / caching down by nice-ing it, dont increase priority of the thing you're doing unless you cant "nice" the scan / caching process
At least for me on W7, I usually see roughly equal use of the cores
you run windows 7?
Yup
is it bc you dont like the look of windows 10/11 or the telemetry? (or smth else?)
Yes
which
Mainly the UI, but also the telemetry, forced updates, ads etc.
ahh
I have a friend who skins his W10 to look like either XP or 7 because he says it makes it run faster
why can't all languages be the best of every language smh
the more I use c# the more I wish c++ had good reflection and the more I wish that c# had static template types
(relevant xkcd)
I like c# for the most part but I wish it was less annoying and horrible to pack/unpack structs
Also would be nice if you could make your own DSLs like you can with kotlin
I feel like I'm a kid again teaching myself java.
Every couple days I go "why the hell did I do that it's stupid" and delete a bunch of stuff lol
Thats right, because the UI Elements of Win10 are all images. Win9x, WinXP & Win7 uses coded generic UI elements. The processing is a lot faster and needs less RAM. The old OS runs a lot more efficient. Programs nowadays are bloated with Framework Code and other inefficient stuff.
Are you saying he wasnt full of it
He is actually right. When you find an application like XPAntiSpy for Win10 which is able to change the UI Elements from image based to generic coded can you really see the difference. When I remember right was Win7 the last WinOS were you can change this by yourself without any effort and this has a big impact on the system. The System will then look like Win9x, but it boots & runs 20% faster.
coughrustcough
Introwospection?
You sort of can, with source generators, expression trees, T4 templates and other ancillary tools. Though it's not as nice as Kotlin.
Rust doesn't have literal reflection but you can feed just about anything through a proc macro to add it; in Bevy apps it's common to have reflection enabled on just about every type in debug mode.
It's not exactly the same as what you'd get in .NET or Java but I'd say it's the closest you're going to get in a native app.
the benefit is that it's compile time "reflection"
Yes, exactly. It adds to code size but costs almost nothing at runtime.
but to use bevy as an example it has its limitations
people tend to forget to add the derive for it
a simple one
Yeah, they do. For a lot of derives, you can add newtypes, and there are even derives to auto-derive for newtype derives (lol)
there's been talks to just add reflect as part of stuff like component I believe
But with Bevy's reflection that is admittedly a PITA since it's so complicated to implement manually.
Much easier with a Clone etc.
nothing beats the simple convenience and power of reflection in C#
do just about anything even if it breaks every rule C# otherwise obeys
Sure, there's a reason we're all here and not there. Though priorities change if you're working on, say, an OS kernel.
Bevy's ECS is really fast and powerful, though; there's really not much else like it. It'd probably be overtaking Unity if the UI story didn't suck so much.
Not Unreal, because nobody ever switches away from Unreal. But Unity's within reach.
actually I'm in both

so are you I suppose
I almost never really use c# outside work
Overheard: "so apparently the order in which you select the options matter."
(The options are not correlated)
So it would appear. I've never been one for the language holy wars, I'll use whatever seems best for a given situation. (Though I do hate Java, might as well throw out your whole computer and start banging at the problem with rocks.)
Same opinion on Java & JS. As to use Java or JS I would like to work with TCL again, but this is a dead language and was just used in mIRC, Eggdrops & exotic server side scripts like in WoWD (World of Warcraft Server Deamon).
sooo. i've just had a user report that they're having a problem with a mod... but they also sent a screenshot of Vortex. the mod was for Cobalt Core, not Stardew Valley
manually installing the mod made it work
i guess Vortex can't be trusted at all
(redeploying didn't help, or the user didn't do so after i asked them to)
Wow, how disappointing stardew valley doesnt support this smh
oh i'm not complaining about that part
it's just that i know Vortex just doesn't work for Stardew, and i thought it would be fine with Cobalt Core, i worked on the extension to make that work
but apparently not
Vortex was crap from the beginning. I have no hope for the Nexus App at all. Modding was never aimed for user which love shipped & baked solutions.
both their Steam library and Vortex setup is on the D drive, and it's NTFS-formatted
Whats the problem about the NTFS format?
No problem with that
exFAT is apparently a problem, as it doesn’t have the concept of symlinks
That’s what I’ve heard
True, I guess exFAT inherits this from the old FAT format, because FAT16 and FAT32 also doesnt support symlinks.
ah yes, the ancient question of what kinda crappy FS do I have to use to get these drives to be readable by multiple OSes
In my world just exists Linux & Windows. Had never problems with my drives making them readable for both, but I will never work with this Pseudocomputer system with the bitten fruit logo. When DXtoVK is capable to work with the most games will I also smash the window, because it starts bothering me how heavy you have to cage it till it stops to takeover the control of the machine.
Readable isn't bad, but I don't trust the linux NTFS drivers or whatever windows passes as ext4 drivers
Windows has ext4 drivers at all?
I was under the impression that windows was entirely incapable of reading the ext4 format
3rd party ones i think
No problem with Linux Samba. I use it for years for my home server.
I looked and looked
And the answer is not really
NFS can replace it, but it's for linux clients only, and doesn't have the discoverability
stuff like syncthing works, but you cant just log in and browse, it wants to sync the whole folder
thus, im still on samba even though i find it a pain
Windows ext4?????
a fine way to lose data
what problems have you had with the ntfs support in linux? It's been part of the kernel for a whil
I use it to bridge my arch & windows installs with a common drive
tbh I don't think I've messed with it since they added the new drivers
it worked fine for me in the years I dual booted at least
I've never had any issues with it, but I still just inherently feel weird about it.
Same with the ext drivers for Windows!
maybe my most unpopular opinion is i don't like excel, it irritates me, and i don't want to use it
"quit doing things to the data i didn't ask for" x10000000
I wish MS would just add native support for the various open source file systems. But that would be something useful and they'd rather invent nonsense like spyware AI instead
i know you can bypass the auto behaviors with little tricks but i don't want to have to use little tricks
am i just traumatized because people will send me the worst spreadsheet you've ever seen in your life and ask for statistical analysis that uses data they didn't even collect?
since when is not liking excel an unpopular opinion
okay maybe I'm too used to software development environments
excel is permanently a thorn in my side because we do exports and imports through excel files and just someone opening it can fuck everything up because excel decides to interpret everything
this is especially an issue because some clients use excel with the culture set to english and others dutch
and english and dutch don't use the same decimal notation
it's exactly flipped
sorry to all the clinicians out there, but: clinicians
Ah, yes
oh my god people have had to manually recreate files from scratch before because the dutch decimal notation corrupted the whole workbook
what would it take to switch to using postgres or similar?
No one here is going to find that an unpopular opinion 
In what way?
a lot of european countries including the dutch use the comma as the decimal indicator and the period to separate thousands. I mean some countries do something else entirely like. Swedish puts spaces to separate thousands (and also a comma for decimals)
and of course more famously the indian way doesn't even split in thousands
Ahh
you'd think microsoft would have built in like...... not completely fucking it up when files are shared by this point
My favorite was a CSV export we wrote where the first column header was "ID" and that caused Windows to interpret it as some archaic file type due to the bytes it created
i have a sas program that's just a few hundred lines of string parsing, categorizing, formatting, and removing junk rows because the input spreadsheets are just nurses taking notes in a way that looks pleasing to the eye
which i 100% commisserate with
but also it makes my life difficult lol
I just want to send data in a format that doesn't in any way corrupt itself through some intepret stage. There shouldn't be an interpret stage. It should be marked as a decimal or a string or whatever in the file itself
I shake my fist at spreadsheet formats becoming the popular way to do data transfer
"this grad student would like nicer spreadsheets" is a statement that has zero leverage
"the biostatistician on your grant would like nicer spreadsheets" often, frustratingly, also has zero leverage
I am glad I do not work in data science
my sister did the sensible thing and just did an engineering bachelor's before marching off into industry
you'll be happy to know that the our data analysis system gets it data from a regular relational database
though we stil have to do a lot of flattening of tables for the software to be able to work with it
i went and picked a bachelor's that doesn't even make you hirable in this field, so i couldn't work and save any money before diving straight into doctorate
getting on a gra stipend was a raise for me
anyway
i'm just pulling prices from walmart.com as a resource for part of my dissertation and excel's automatic behavior when you drag to autofill cells was pissing me off
back to work
I hear excel is a localized programming language
I wish it weren't
is anyone here knowledgeable with windows drive/partition management
im trying to clone my OS to another drive and am having difficulties
the worst part of excel is it's the perfect tool for any kind of problem you have, so you have to interact with it by default
scientists, project managers, other engineers all use it to make stuff quick and organize data
we should abolish other professions
the amount of crappy excel sheets I've gotten from scientists and researchers is enormous
I once got an excel that was mysteriously 50MB
tbh my mom hates excel too and she was a math professor for an accountancy major so she pretty much lived inside excel spreadsheets
when I exported just the data as csv it magically became like 50kb (I forget the exact size)
and of course, the existence of those people means that whatever cool tool you develop, you'll get the inevitable "can you have this export to csv/excel pls"
It was about 20 columns by 150 rows of just normal numbers
No plots or anything
I suspect they had some stupid stuff running in the background to do stats
soz I will export to some arcane file format you do not have any program for just to spite you
make sure it's not a human readable format either
you can have it as a json file that I converted to base64 and you'll be happy about it
I have embedded all the data as a custom resource in this gltf model file
please use blender to access your data
🙏
at least imports and exports are mostly handled by a different team
not me
do u think anything will finally break the excel monopoly
absolutely not
I personally really like google sheets because I can make custom functions with JS
I'll on my death bed and the doctors will be calculating the morphine doses I need in an excel spreadsheet

hey excel supports python...
kind of
ish

When we get a new client, half of the work we usually have to do is gather all the spreadsheets that are literally running their entire company and basically port the business logic of them into a custom application / web app
So many small businesses use it for literally everything
And then fight them on letting them export things back into spreadsheets so they can keep doing what they used to
"Tell me your use case and I'll build it into the software"
I feel very seen right now
I had a guy tell me he appreciated I didn't let him have his way because it saves him 3 days of his week
3/5 of every week!
you hit the jackpot
I'll be dead before the PhD clients I work with say they were wrong lol
that's unheard of
doesn't it run that remotely lol
I am once again upset by javascript
what is this
I define an Int32Array of a length of 5, then try to added an key value pay of string to it and it's just like "alright"
it even still claims it's an Int32Array(5)
typing is a social construct
seems to be 
since Int32Array is really just an object that manages an array of integers you can apparently just add new properties to it cause it's quirky like that
and the node repl just prints it like you added a key value pair to the array
nice, built-in buffer overflow
js is extra cursed because unlike python it pretends typing mean things
Let me just do some questionable getattr work in python
unlimited power
Who doesn't love return getattr(self, test, lambda: logger.warn() or True)()
Just me?
I don't even know what that would mean
Basically, look up the function on myself that has the name specified by test and call it
If not found, log warning instead
yeah javascript is ~ magical ~ /s
I've actually abused this "feature" before to create bidirectional int/string maps
not that I would recommend actually doing that
Can you foreach over an Int32Array?
I'd assume so
I'm on my phone at this point
you'd have to find out yourself what happens
so it just doesn't iterate over the new property
it's what I'd expect knowing what's actually going on but it's also simultaneously strange
For of and for in loops can be used to iterate indexes and properties but I can never remember which is which
You don't need to use ForEach though
There is no way to iterate both at once though
I wasn't feeling this colorway originally
But now I've started knitting it I've dubbed these the trans rights socks
Cast off the gay rights socks in June, immediately start the trans rights socks
Not sure where to ask but since its governor adjacent: Is there an archive of past monthly xp leaderboards?
looking for may specifically
Unless internet archive happens to have one, no i dont keep any
Hmm. Any way to calculate how much xp is in 72 levels?
I'll dig back in to the github. thanks for answering!
Each level is 300 xp
The bot gives 10 xp each time you talk, with a 1 minute cooldown
So 72 levels is 36 hours of communicating
Wow. Thank you. That is incredibly helpful.
https://www.theregister.com/2024/06/20/systemd_2561_data_wipe_fix/
Oh. Well that's nice.
But what if I want to delete /home
It's only slightly less likely, don't worry
sudo rm -rf /
its run0 rm -rf / now
do you not need --no-preserve-root
I'll admit I haven't tried it
sigh... systemd
its more like the daemon manager
or it started that way, now its a whole suite of all sort of stuff
It's my bootloader too
ahh
its controversial lol
and how exactly does it "accidentally" wipe /home?
by being very good at its 2349809 jobs /s
It's apparently a weird feature that was allowed to do so
ended up talking to one of those guys with an extreme hatred for systemd recently
I don't have an extreme hatred, but I understand where they're coming from, since it represents escalating centralization of an architecture that was originally defined by its lack of centralization.
And looking at stories like that, I'm coming to believe those guys are right; while the decentralized precursors may have been hard to manage, systemd is starting to look increasingly like every piece of bloated monolithic software.
honestly I’m not even aware of most of the things systemd apparently does
all I know it for is for managing my services
systemctl enable [name].service
I’m always surprised by other things it apparently does
the guy I talked to then though talked about systemd like it took his family hostage and burned down his house though
it was a little much
That's the thing. If it were a bunch of independent projects by the same group, it would have much less resistence. I actually really like all the systemd stuff ive interacted with directly
honestly didn’t even know it didn’t work like that
do I have run0 installed
I’m not home so I can’t check
I mean I have access to my home server but I doubt it’s on debian stable
even debian unstable seems to often be months behind
it seems to work well for managing services idk about any other part of it
maybe I’ll look at alternatives someday
the guy I talked to who hated it was so unreasonably against it that I almost felt some kind of spite response to disregard their opinion
he even started talking about how systemd is probably paying distributions to be included and that there was some conspiracy behind it
damn
7 grams
30 MB somehow
not exhaustive
it's missing the systemd-tmpfiles from the article at least
is that not just tmpfs
what a gloriously profane piece of prose https://ludic.mataroa.blog/blog/i-will-fucking-piledrive-you-if-you-mention-ai-again/
it reads like a very elaborate Tumblr rant from ten years ago
factorio 😎
whats run0?
5️⃣ Here's the 5th installment of my series of posts highlighting key new features of the upcoming v256 release of systemd.
I am pretty sure all of you are well aware of the venerable "sudo" tool that is a key component of most Linux distributions since a long time. At the surface it's a tool that allows an unprivileged user to acquire privileg...
systemd is literally trying to do everything huh
everything else aside, run0 is a bad name, a number in there isn't easy to type
Yeah its systemd's alternative to sudo
I dont mind them making one, but idk how i feel about another user escalation tool being installed automatically
I agree about the name tho. Perhaps "rune" wouldve been better (run escalate?)
why do they put everything in one giant package anyway
a good question
openbsd also replaced sudo (with doas) some time ago. i don't remember their reasoning, but it was probably security since it's openbsd
Ive been using doas as well, for no reason other than to just try it
@safe dragon You have 0.6% of the server's entire XP
@silk narwhal the tl;dr is that the best free and open-source statistical programming language is far and away R
R is mostly built off of C. i'd describe it as a second cousin of C# with python in the middle
Mmhm 📝 Python does feel a bit like a hack-job at times (or maybe that's just the way I've been using it....) so I can see that
there are tons of free resources from R or RStudio (the main IDE people use, also free) for picking it up. you can do stuff other than stats in it - i made a shiny app to track grocery prices and estimate recipe costs in 2018 or so
i mean, i guess that's stats-adjacent
Oooooh
i'm actually editing the jsons for my mod in rstudio because it's just what i'm used to using lol
I feel like I wanna sit for a moment to organize what my goal would be with developing this skill in this context (though it's something I'm definitely gonna want in several other situations) but do go on if you have more info to share ahaha
the trick with statistical programming, and the main reason why i have such strong opinions about using AI to do your stats for you, is that statistical analysis is 10% running the code, 30% preparing the data to be used by the code, and 60% knowing what the hell any of it means with all the nuance and context required to make statements about causality, association, etc
the latter is what statistical education is for (or, if you are in a work situation, going "hey boss we need to hire a proper statistician")
but tbh that is mostly just listing caveats
Definitely not at a "hire me for this level" I don't think though ahaha
and unless you are wanting to learn some more stats programming so you can be on a clinical trial then the stakes aren't so high that you need to worry about it lol
i would download R and RStudio and just start seeing what you can model/build. in the console you can type "?keyword", "?function" etc to pull up the documentation within the IDE and fall down wiki rabbit holes from there
Oh perfect ahaha
stats education and communication tends to be really dry and hard to take in, which is where more communication-heavy people like me come in. i didn't manage to do any TAing during my doctoral education because of where my funding comes from but i'm sure i will be writing curricula and lectures and such wherever i end up
I suppose I want to be able to make a mod compatibility resource which has a lot of useful, organizable data regarding Stardew mods... that's my goal with this for now at least
if only to be like DON'T SEND THEM AN EXCEL FILE at a cro or whatever
a shiny app sounds like the way to go
Stats are only as useful as they are interpretable!
@red crest was working on an extremely beautiful tutorial last week, not sure what platform she built it on
but R shiny can make stuff like that
I can see why communication is really important in such a field
the syntax of R i think is more like python in that you can just ctrl+enter to run one line at a time, you don't need to worry about semicolons or anything
R can do standard if branching and loops and the syntax/structure are like the rest of the C languages
Mm, in that case I'll hopefully be able to hop into it without too much trouble ahaha
if you're going to build a shiny app as a mod compatibility resource, 100% learn R with the tidyverse packages instead of just base R
Shiny app sounds exciting but I'm not so good at visualizing what it ought to look like
well, that's where the rest of the server comes in lol
True! I've been thinking this could be a good thread topic actually
you're gonna want one or more (if more, relational) underlying datasets from which you draw tables and graphs and such
:o I see
tidyverse is great for sorting things like that
piping!!!!! it's got piping!!!!!
Okay, I'm starting to comprehend the vision and the power a little more
i haven't used shiny in a while - my dissertation has involved.... well, novel writing..... and biostats tends to be pretty sequestered in SASland because the FDA really prefers it
but i'm here to ping or dm with questions and such
I'm not totally sure it's within my reach though ahaha but I'll definitely try experimenting
SvelteKit! web dev framework
so all in browser
(progress on that has been slow admittedly... Elden Ring calls to me too much, plus Dawntrail prep)
insane that i'm the final fantasy recipe mods person and i don't even play ffxiv
(Attention deficit brain has locked into a shiny new thing name. that wasn't related to what was actually being explained ahaha)
y'all are gonna have to ping me if there's newly added food that should go in the mod bc i won't know 😂
Now I want to tinker with more things than just Stardew ahaha
Stardew is already a diversion from something else I was tinkering with....
the powers and good looking ness of Shiny apps remind me a bit of notion, actually
(I have no idea what the context of any of this discussion is I just saw a Shiny New Ping
)
you can make notion templates public, if what you're looking to make would be made more easily with that
those tutorial screenshots looked so good! i lavished praise during the extensive peer review but, for real, it looks awesome. beautiful. easy to engage with and comprehend. everything you need in the packaging of educational material
Browse 10,000+ free and customizable templates for every part of your work and life.
hopefully I'll be able to show it off more soon! it's mostly just been ugly behind the scenes work on it so far, the only reason any tutorial exists at all right now is because I needed to put something there to test the functionality
I'm just too easily distracted ahaha, I'm like nooooo focus, me, magitek was explaining something useful and you shared some other information that they were asking about (which makes sense) and my brain is just like. oooh what's SvelteKit
people have actually made stardew perfection trackers and such within notion
people have sold perfection trackers and such with notion
obviously i'm 100% for people learning R but if notion (java-based, very easy UI, can do basic stuff with tables) will do what you want, the learning curve is far less steep
and you're not gonna get the "what the fuck is that?" response with the link
(SvelteKit is web dev so JavaScript and HTML and CSS and all that fun stuff)
i say steep - i think in the grand scheme of things, R is not that bad
That sounds fun except for the part where I don't know javascript ahaha
So much to investigate!!
the error messages are not super helpful. i would say "that's what google is for" but google has decayed so much in the last decade
Very exciting
but i have a bias on how hard it was to learn because my undergrad program threw first-semester freshmen into R programming with no background or instruction
i still feel bad for the TAs in that course lol
if you know C# you can easily pick up JavaScript too
good luck with R though it's very different-
(I don't really know C# I'm kinda hacking stuff together ahaha)
it's different, but for the purposes of data presentation i think it's different in a way that is less hard and more "different grammar"
that's what i mean. Once you know "how" to program, the grammar is the difficult part of learning any new language
I'll try! Probably gonna be an on-and-off thing I expect
tidyverse is different than base R, but tidyverse is what works best with shiny apps so that's where i would start
Yeah learning the grammar definitely sends me for a loop, nice to know that's kind of just a programming experience
yeah, i've needed a lot of help putting the "wrappers" around C# code but within the class brackets i've mostly been able to fend for myself
though i wonder how much of that is C# and how much of that is "this is a game engine"
#1 thing statisticians are not programming: game engines
i used C# exceedingly little before Stardew but it was easy to pick up coming from mainly JavaScript experience
but if you tossed me into an R environment I'd be spending a lot more time on Google and stack overflow
a nice thing with R is since you can run things line by line, you can test every little thing and know immediately when something isn't working
stackoverflow my beloved
stackoverflow is my best collaborator
sas pisses me off sometimes because (since it's proprietary and very expensive) you really have nothing to go off of except institutional networking and whatever the official documentation is
the official documentation says you can turn on dark mode
the official documentation is WRONG.
it looks like THAT
Noo
the good news is you won't be using sas
i guess i should be clear i have nothing against sas, it fills an important role in the pharma/med device ecosystem, and if you are using sas you are generally using it as a very well-paid person working during daytime business hours. i have also heard they are a great employer
but i hate that the ide looks like that lol
I was working with some ancient-looking program for my mandatory stats class (gave it a quick google search and it's in fact a sibling to sas it seems) and I hated it
spss?
Yep
well, lucky for you, rstudio is a modern-looking ide
it doesn't do the rainbow bracket color coding like vstudio but people have asked for it
and now i am also asking for it
right out of the box it won't have a pretty dark mode but you can apply whatever preset from global settings
I'm not far enough in the real ide use time to understand the need for rainbow colour coding but I can see it's very beloved
(<- notepad++ user)
I admittedly have trouble configuring VSC to look how I want ahaha
(i actually dislike rainbow brackets personally... too distracting to me)
i just let my ide indent things for me and that's good enough for my eyes
See I feel like I might be the same, but I don't think I've used them enough to say for sure
Welp, plenty to learn for me! I think I'll go make a thread for the topic of a mod compat resource
make sure you double check the junimo pin about making threads i was just paraphrasing it when I told you about it earlier
the rstudio tour - top left quadrant is where all your scripts live. RStudio supports standard IDE text editor stuff for a number of different languages, including R (obvs), C++, json, sql, python, markdown, shiny
(it has no relevance to me bc I am not a mod author so I just skimmed it)
the compilers you have to install yourself, ofc
It's good! I was there for the announcement ahaha
bottom left is the CLI. you can type directly into the console, use ctrl+enter to run one line of code from the script editor, or run all at once if you so choose
top right shows all of the shit that's loaded into the workspace. R's default behavior is to save everything all the time between sessions, there is a command to delete everything in order to test in an empty workspace. i am often too lazy to do that, clearly
bottom right is where documentation and graphs and such will show up
Documentation :o
i think r documentation is pretty well-written
let me find a basic tutorial series to link you to
I'll keep a note to self here to get back to this
oh this sounds very cool https://swirlstats.com/
:computer: swirl's official website
man i wish some of these resources existed ten years ago lol
it is difficult to look up help with R because it's shorthand for reddit. just look at that. r/rstats
maru does it again
I'm just getting to learn about delegates in c# and I'm pretty confused...
how can I do this without having to use the dynamic keyword as dictionary value? 
public delegate void Event_A(ObjectA dataArg);
public delegate void Event_B(ObjectB dataArg);
public Dictionary<string, dynamic> myEvents = new(); // How to replace 'dynamic' with 'List<method group>'?
public Constructor()
{
myEvents.Add("Event_A", new List<Event_A>());
myEvents.Add("Event_B", new List<Event_B>());
AddEventListener<Event_A>(SomeMethod_A);
AddEventListener<Event_B>(SomeMethod_B);
}
public void AddEventListener<T>(T callback)
{
var eventType = typeof(T).Name;
myEvents[eventType].Add(T); // Does this forces the use of dynamic?
}
C# delegates are crazy and support what’s called multicast delegates, so you only really need a single event Event_A YourEvent; declaration
And that already allows multiple subscribers via +=
each event handles a different argument type, though
Why do you need a dictionary to hold delegate methods?
Using the pattern will be a lot of work compared to just adding an event to something
You need to completely toss away your typing at some point when using a Dictionary and you'll end up needing to do complicated things or very slow things
it needs to use a single method (AddEventListener) that can take in a reference of different event types, so I thought using the type identifier would be the quickest way to map those out
Do your delegates ever have different argument counts?
always the same count
(I'm also confused at the use case tbh)
I think its just a contrived example
Anyways
Yeah this definitely seems like the XY problem to me
I've put so many design restrictions on myself it's giving me a headache tbh 😅
(Side note: I know what "xy problem" actually refers to
But my brain always infers first as chromosomes
It's just like when people say "acab" I first read "assigned cop at birth" then do a double take)
those XY tend to cause problems yeah
(Assigning people as cops at birth is just cruel)
😅
Anyways my first step would probably be unwrapping the delegates you're using to have one less layer in the type data. Since that will make the calling convention easier to use.
public void AddListener<TArg>(Action<TArg> listener) { ... }
public void Emit<TArg>(TArg thing) { ... }```
okay so... the broadest picture of the problem I can give is...
I need a SDV mod to pass a method call to another SDV mod framework, which exposes different delegates with foreign types as arguments (merged thanks to pintail)
but now it turned more into a #making-mods-general question lol
Use TArg as the dictionary key. Store objects in the dictionary. And cast the object to the appropriate List<Action<TArg>> when using it. I guess
Oh boy foreign types. Yeah have fun with that then
the foreign type problem is essentially solved if using delegates... spent already way too long figuring that out 😅
but using delegates with the different signatures given becomes one of the design restrictions
Seriously use Action<TArg> for a generic one argument delegate
You don't want to be binding lots of random delegate types. They're harder to work with for literally no gain
In this specific use case
but doesn't that just move the problem to having different TArgs?
I assume you're calling the delegates at some point
Otherwise what's the point of them being delegates
I'm having a hard time visualizing using Action<TArgs>, so I'll just give it a shot lol
It will be simpler to call them when the generic type is the argument type and not the delegate type in full
Action<T> can be invoked with a T to call the delegate.
A T by itself, which is how you were doing things, cannot be invoked until you cast it.
You'd be better off not using generics at all and using Delegate over just a plain T
Action<TArg> remains my suggestion for the least bad way to do it
I'm also concerned how pintail will handle those
it'll merge the different TArgs, but will it be able to merge Action<T>?
(sorry if merging is not the right term... I just mean the foreign type becomes available as a usuable type)
When you're writing code for the record, if you have a random delegate type with one argument that returns void, you can just plug it straight into a method that takes an Action<TArgs> and it works fine.
Strictly speaking Pintail will be doing more safety checks with Action than it was doing with just an unconstrained generic parameter
But no if you're relying on pintail to do conversions you can't use generics.
At all
And your previous code will only have been working because of dynamic
I assume
But again XY problem, I don't know exactly what you're doing so I can only make guesses
really sorry about the XY problem... I'm really confused about the whole thing, so it's difficult explaining the problem too 😅 but...
I know for a fact pintail can make the foreign type IPortraitData acessible using delegates, so I was hoping to do something like this
public class FrameworkAPI
{
public delegate void OnPortraitRenderingEventDelegate(SpriteBatch b, DialogueBox box, IPortraitData data);
public delegate void OnSomeOtherRenderingEventDelegate(SpriteBatch b, DialogueBox box, ISomeOtherData data);
}
which works fine with multicasting, but the next step is wrapping those events in a try/catch and print a message if the method on the other mod's side errors
which brings me back to this solution #programmers-off-topic message where I was trying to have the framework consumer pass the method calls through a common method AddEventListener
if I understand your suggestion correctly with TArgs, this would give something like this, perhaps..?
public interface FrameworkAPI
{
public void AddEventListener<T>(IManiferst mod, string eventName, Action<T> callback);
public interface IRenderArgs {
public SpriteBatch b { get; }
public DialogueBox box { get; }
}
public interface IPortraitRenderArgs : IPortraitData, IRenderArgs { }
public interface ISomeOtherRenderArgs : ISomeOtherData, IRenderArgs { }
}
but then pintail can't handle Action<T> ... probably
Yeah, you can't really use a generic with pintail like that. It sees a generic and just goes "oh well okay nothing for me to worry about" and passes it straight through
No proxying whatsoever. In order for it to proxy, you need concrete types.
hmm
You're making a ton of extra work for yourself over just using two separate events
so like you said, dynamic is unavoidable, unless there's explicit type usage
there's actually 22 events 
wouldn't that be hell to look at the API though?
At least use one method per distinct call style
11 argument types, 22 events, 44 methods to add/remove those
You could use overrides
Err wrong term
But yeah if you want pintail to work you need to do it that way
so the question becomes... which is uglier between lots of repeated lines of code, or dynamic?
Pretty sure this boils down to either use a bunch of different signatures and keep type safety or throw away the type information and have to deal with the possibility of runtime failures.
said better than I could 
People using your api would probably pick 44 different documented methods that do 1 thing each
Yeah. I would prefer that
If my code is going to break something I want it to break at compile time and not runtime
hmm... but that gives me a counter-argument... because dynamic is only used on my framework's side
from the framework consumer's side, they just see that the framework API has 22 delegates and 2 methods (add/remove) that take in a generic type
isn't that easier?
the only way I can think it would fail is if they try to use a delegate that doesn't exist on the framework's side... but that's going to fail either way
I think I'm stuck in the sunk cost fallacy lol
er...
the API wouldn't even need to expose the 22 delegates
just add/remove methods that take in a string that represents the event to hook to... but I don't like that either
That sounds 100% valid for weakly typed languages but C# is strongly typed 
are my [weakly-typed language] roots showing? 😅
Dw I would do exactly what ur thinking of in python too
It's probably even "pythonic™️"
JS actually, but I fell in love with Lua lmao
It's as Khloe said tho, u should have things explode at compile rather than runtime if u can
Even if it's more lines of code
but that's the part I'm confused about, because the two mods will only join together at runtime thanks to the power and love of pintail lol
They would have a copy of ur api instance class
From where the IDE can go like
Oh you put wrong type here watch out
that's a valid point I can't argue with
essentially the same reason I don't want to use string as argument
In this case "exploding at runtime" is when Pintail fails to bind to the API. That's where you get your type safety
And that's what you want, ideally
For that, you need concrete types and lots of methods
ahhh! but the sunk cost! I had working code 3 weeks ago before I learned about all the pintail shenanigans
I saw these 22 methods, thinking how I need to add 22 more to remove the event and I thought to myself... how can I merge these all into a single method lol
eh, i guess you could have Dictionary<whatever, Delegate> and cast the Delegate to the correct type each time, maybe

coughrustcough
Turbofish is wild, but what I actually was referring to was that most programmers coming to Rust from another language would agree that it is not the grammar that is difficult to master, but the borrow checker.
There are a few such languages out there that do require you to rewire your brain entirely.
Yeah. (Turbofish is perfectly normal generics. I just find the syntax hilarious)
The other comment was about explicit lifetimes
Yep, I think of that as part of borrowck but it does have a distinct wtf-ness all on its own.
Haha, I was trying to type an example of one of the stranger signatures I've had to write, and Discord's parser can't even figure it out.
the grammar of rust really ain't that bad
it's neither verbose(coming from C#) nor practically obfuscated(like haskell in my very uneducated eyes)
Don't get me wrong, I like Rust. But I reserve the right to poke fun at it
Same. Rust is my #1, or at least my #2.
If I can't mock a language what use is it
But that doesn't mean it's not hilarious sometimes.
I definitely have plenty issues with rust even if I like it
Rust my beloved I wish I could use you more
Every week I wish I could write my fpga code in Haskell or at least verilog
But noooooooo
Fucking labview
I wish every language community had the documentation culture of Elixir... rust ain't as bad as many other languages but still it can leave something to be desired beyond the "example" directory in their repo
fn widget<'a, 'b, 'c: 'a+'b>(title: &'a str, content: &'b, style: &'c Style) -> Container<'a, 'b, Message> or something like that.
RRrrrrrRRRRRRrrrr
the moment I have to place lifetimes manually I panic worrying how far that will cascade down
Yeah, they're viral. But then, all Generics in Rust are viral.
I do everything I can to avoid defining lifetimes
Honestly, those things are funny, but probably the most genuinely frustrating thing to me in Rust is the trait coherence problem.
And never pass self into anything
It's surprising just how much you can get away with returning only value types without noticeably sacrificing performance, memory, etc.
yeah
Avoiding references really is the answer like 90% of the time.
It's hard to completely avoid Box though because traits are 50% useless without it.
I honestly haven't used Box very much at all
But then again, I dont use traits too much either
Box<dyn Trait> my beloathed
It's a love-hate relationship.
Whether or not you care about traits and boxes will likely depend on whether you're writing mostly app code vs. a lot of library code. If you want other people to be able to extend your work, you need traits.
in the end once it compiles all that gets forgotten and replaced with surprise it seems to already work
Yeah, I've only written applications
or stuff that I'm the only one using the API for lol
Yeah, that's why I say Rust gets my #1 or #2 spot. There is no other language I can point to where I'll churn out 3k+ lines of code without testing (or being able to test), then finally running the thing and seeing - "Holy crap - it WORKS!? On the FIRST TRY?"
the orphan rule, the enemy of library developers who want to provide support for other crates
^ that's what I really meant to say by trait coherence above, I forgot the exact phrase. Super frustrating.
And even when it doesn't work it crashes faster:P
I don't know if they've tried to fix it in recent years, but the only workaround for the orphan rule is a bunch of conditional compilation features, which usually means workspaces, and workspaces also suck.
pretty much
there's some open work to provide some way to relax the orphan rule but last I saw there's little reason to believe that will ever actually happen
C# is definitely a nicer language to code in, and way nicer to debug in. But it's still somehow less productive than Rust when I look at actual output.
I mean, when I look at my output - YMMV.
my main thing with C# is that due to extensive use of (runtime) reflection there's a lot of runtime crashes and bugs to iron out
I can't assume code works at all if it compiles in many scenarios
It's gotten even crazier with Memory, Span, ref struct and so on. Very powerful stuff but you have to be very careful.
really only use span of those. Which of course technically means I use ref struct cause it is one but yeah
My biggest gripe with c# is the lack of safety rails when threading
I do love span
"My code doesn't use Memory" ~ Crumble
it doesn't anymore thanks to span 
Parallel extensions and parallel LINQ are pretty convenient, but yeah, no safety whatsoever, you have to do any synchronization yourself.
(so there's hope for me yet?)
And AFAIK no linter
Though the .NET Framework was one of the first (IIRC) to actually give us concurrent collections out of the box. Java took how many years to catch up?
I don't even want like the compiler slapping my hands as much as I want a linter
Hey idiot this variable can be accessed by two threads plz check it again you fool
"u dumass"
rust is on the polar opposite side of that like "hey there is a theoretical possibility of maybe technically having some issue that could be construed as a race condition please fix it"
I don't mind the compiler error; Rust telling me "this doesn't have Send+Sync" pretty much tells me all I need to know, and usually the solution is obvious (e.g. use a Mutex, Arc, whatever).
Although it can occasionally be frustrating if the data totally is thread safe but the original library developer forgot to mark it that way (e.g. passing around a trait that should extend Send+Sync but just doesn't).
sorry int isn't thread safe
newtypes it and implements Send + Sync
A linting solution for C# would probably be hard though, because there's usually nothing in the syntax itself to indicate that something is multithreaded.
You'd have to have heuristics based on library calls like Parallel.
And even then, you've got Parallel.ForEach(sequence, SomeMethod), the analyzer would have to go down the whole tree to realize that the implementation of SomeMethod is exposed to parallelism, even though the method signature says nothing about that.
I think the harder you try to solve that problem once and for all, the closer you get to something like Rust's rules - you have to explicitly declare thread safety, and dependency on thread safety, else it isn't thread-safe.
tbh almost no non-functional language that I've seen has compile time thread safety analysis
I certainly can't think of one. Even unit-testing thread-safety is borderline impossible or actually impossible depending on the implementation.
("Assert that X does not happen and will never happen in the future" - uhhh....)
functional programming languages circumvent much of the issue by not allowing for mutation
Yup. No surprise that .NET started adding a bunch of immutable type support a few generations after all the fancy async support.
now we just need a good way to also guarantee immutability of the internal fields...
All roads lead back to Rust eh
Just use trai.. oh, right.
that honestly just looks like funky reflection
If only there was a language with python-ish syntax, but static typing, and good out of the box library support...
nim isn't real it can't hurt you
It's more like JavaScript associative array fields on indexed arrays, I think.
Well, there is pytype. It's not exactly good, but... it exists.
I mean yes the example I linked was funky reflection
But in q type nonsafr way
And taking advantage of truthiness
though recently I had to implement something where it was vital to check for value equality in C# and I just about cried
And could compile to javascript for some reason
TS is actually good, though, the fact that it compiles to JS (really ES) is a necessary evil.
No I'm here to praise our lord and savior Nim
WASM might be the future, but it ain't the present.
I remember Coffeescript! It was really popular with a certain contingent pre-TypeScript.
What was the point of coffeescript because I did it once and I didn't get it but I was also like 14
There was also Google's JS compiler.
A certain contingent who also learned Haskell and didn't shower?
I've mostly been in rust land lately for hobby stuff but the moment creeps ever closer that I'll get to the frontend of the project and I still don't know what to write it in
Are you kidding? Haskell programmers wouldn't be caught dead writing web apps.
Typed or untyped, forget it.
