#programmers-off-topic

1 messages · Page 18 of 1

deep drum
#
Static Ref Finished. Time: 2403ms. Num: 2000000000
Static Ret Finished. Time: 3033ms. Num: 2000000000
Instance Ref Finished. Time: 3160ms. Num: 2000000000
Instance Ret Finished. Time: 3110ms. Num: 2000000000
#

@cinder karma
For simple values, looks like ref is faster, but that's probably just because of the StLoc instruction

marble jewel
#

Ever use BenchmarksRunner? It can gather statistics and report memory allocations.

deep drum
#

if it's c# then no, I mainly use python and c++ at work

marble jewel
#

Obligatory mention because it's something Nick Chapses uses in every one of his videos

#

But super useful and easy to use

cinder karma
#

Oh I use benchmark dotnet

#

Usually from linqpad when lazy

marble jewel
#

Oh, I wonder if that's the package he uses

deep drum
#

Rider has its own benchmarking built in for memory at least, I use that to profile my memory

cinder karma
#

That's a surprising difference

deep drum
#

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

ivory shadow
#

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.)

deep drum
ivory shadow
#

Honestly I would expect all that code to replace your method with a single add instruction

#

ldloc
add
stloc

cinder karma
#

Can you (a) dump the raw assembly and (b) try putting a return on the refs

deep drum
deep drum
ivory shadow
#

Linqpad seems to be using an add as I'd expect.

#

A method as simple as return input + 2; is absolutely getting inlined.

cinder karma
#

Yeah

deep drum
#

I might be building debug mode actually, one sec

cinder karma
#

Which is why I wanted to see the assembly

#

(Khloe has it on the right)

ivory shadow
#

Same with RunTestStaticRef

deep drum
#

oh the actual assembly, not IL

#

my bad

ivory shadow
#

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

deep drum
#

did you use any different compile options?

ivory shadow
#

Release mode.

#

That's it. Release mode. .NET 6.

deep drum
#

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
ivory shadow
#

There you are.

#

I knew that had to just be an add instruction

#

I had faith in .net

deep drum
#

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?

ivory shadow
#

You need to prevent inlining to test that.

#

Which you can do

cinder karma
#

I feel like this would be something that is incredibly not the actual problem tbh

#

And incredibly dependent on what the jit decided

deep drum
#
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

ivory shadow
#

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:

  1. Loading a local onto the stack
  2. Doing something
  3. Setting a local from the stack
deep drum
#

I guess nothing, it was more of an "I wonder" moment

#

not trying to prove anything ig

ivory shadow
#

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.

pliant snow
#

😈 Don't listen to them. Just one more tiny optimization, and it'll all be worth it

deep drum
#

still not very used to the JIT aspect of the language

ivory shadow
#

Yeah, I imagine it must be quite a thing coming from a lower level language like C++

deep drum
cinder karma
#

Hey, I would consider it for a bigger struct

#

But for four bytes?

deep drum
cinder karma
#

Lists are always passed by reference in c#

deep drum
#

that's what I meant

cinder karma
#

There are rules around this, look up "should I pass this struct by ref"

deep drum
#

like I don't explicitly have to say it's a ref like I would in c++

cinder karma
#

But, like, four bytes is teensy

deep drum
#

my gf said 4 bytes is average sized angy

deep drum
cinder karma
#

Ummm actually I'm thinking of a blog but I don't recall howwww I found it now

gaunt wadi
#

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?

gaunt wadi
marble jewel
#

This requires you have your phone or other device on you like a smartwatch

#

Lookup BLE Beacon

gaunt wadi
#

interesting. is that energy efficient? I'd worry about having a ble connection on all the time on my phone

marble jewel
#

The LE in BLE is low energy

gaunt wadi
#

.img thinkies

gaunt wadi
#

it'd be neat if buildings came with weight sensors in the floor everywhere

#

that'd work really well and be very accurate

thin estuary
#

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
hardy jewel
#

@brisk cloak Hey there, please don't ping CA unnecessarily!

cinder karma
#

We were considering RF badges

#

Yes you'll need to remember to wear it

#

But you sure will remember when the AC ignores you

pliant snow
#

Interesting project

safe dragon
#

looks handy

sonic mirage
#

I'll have to check that out

lethal walrus
sonic mirage
#

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

pliant snow
#

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

gaunt wadi
#

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

pliant snow
#

We use Teams

#

I'm sure someone out there likes it lol

deep drum
pliant snow
#

But hey, it always seems to be online, as much as it ever is

sand frost
#

Hate Teams

safe dragon
#

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

sonic mirage
#

Would those of you that have experience with both say that you prefer Slack over Teams, then?

sand frost
#

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)

pliant snow
#

I preferred Slack back when we used it, yeah

deep drum
#

I use Linux for all my work and the teams experience is absolute garbage, MS basically doesn't care about it

pliant snow
#

haha yeah

#

Alright does anyone here understand HTTPS certification thingies

sonic mirage
#

Yeah so you set up Let's Encrypt and fuhgettaboutit

deep drum
pliant snow
#

Which I do

#

but

deep drum
#

like what kind of certification thingies

#

how to install them?

pliant snow
#

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

#

and it'll actually support HTTPS

deep drum
#

letsencrypt doesn't offer wildcards afaik

#

but yes, you can letsencrypt any number of "subdomain.domain.x"

pliant snow
#

and even if im just accessing them over my network magically HTTPS will work?

deep drum
#

if you use something like nginx or apache, there's automated tools to do the generation of certs entirely for you

sonic mirage
#

LE does subdomains now, but yeah last I checked not wildcards

pliant snow
#

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

deep drum
pliant snow
#

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

deep drum
#

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

pliant snow
#

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

deep drum
pliant snow
#

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

deep drum
#

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

pliant snow
#

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

safe dragon
#

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...

pliant snow
#

what do you mean self hosted with cloudflare

safe dragon
#

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

pliant snow
#

I see

lethal walrus
#

like a cloudflare tunnel?

deep drum
#

you'd need one of two things:

  1. example.com to 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 to example.com knows 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

  2. 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.com route from outside of your home network.

pliant snow
#

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

deep drum
#

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

safe dragon
#

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

pliant snow
#

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

deep drum
# pliant snow > The drawback of this is that you're exposing your home network to the outside ...

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.com points to your public ip 123.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

pliant snow
#

So I do have a webserver (the one governor runs on), could I just point it there and not expose my own network?

deep drum
#

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

pliant snow
#

hmmm

deep drum
#

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

pliant snow
#

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...

pliant snow
#

ooo

#

@safe dragon is this what you did

safe dragon
#

I did not know that existed

pliant snow
#

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

safe dragon
#

I have it on basically permanently

pliant snow
#

I just dont want to route all my laptop's traffic back home when im out

safe dragon
#

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

deep drum
#

I just googled Tailscale HTTPS

safe dragon
#

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

pliant snow
#

How did you set up the warden subdomain for your tailscale then?

deep drum
safe dragon
#

yeah

deep drum
#

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

pliant snow
#

Oh i want that

#

Ohhh i see

deep drum
#

the name is just a name

pliant snow
#

Thats done at the A/AAAA thing level

deep drum
#

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

pliant snow
#

I only know enough networking to be dangerous

safe dragon
#

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

deep drum
#

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

marble jewel
#

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.

regal ingot
gaunt wadi
#

what do you all access from your local network when away from home?

tailscale looks cool but I've never needed to do that

safe dragon
#

for me, pretty much everything is locked behind tailscale

#

accessing the smb drive and accessing my password manager are the main ones though

pliant snow
#

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

safe dragon
#

🙏

marble jewel
#

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.

supple mountain
#

esolang but the syntax is loss

safe dragon
#

go make it

supple mountain
#

i am satisfied just knowing someone already did this SDVpuffersquee

orchid wren
#

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

strange copper
#

!commissions

indigo mistBOT
orchid wren
#

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

cinder karma
#

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 🙈 )

gaunt wadi
#

@pliant snow 👀

#

now I wait eagerly for the devices to actually arrive

pliant snow
#

You have ascended

tidal charm
#

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.

ivory shadow
#

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.)

pliant snow
#

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

pliant snow
#

and now its frozen trying to open the command menu

#

holy shit

#

guess I'll try their CLI tomorrow

dapper sinew
ivory shadow
# dapper sinew what mods you make?

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.

dapper sinew
#

oh! i forgot you made stardew mods

#

been playing to much MC forgot about modding stardew

sand frost
#

Occasionally in the Stardew server we make mods 😛

#

More often we get off topic

dapper sinew
ivory shadow
dapper sinew
#

OH spooky

#

thats not good

ivory shadow
#

Very typical Curseforge behavior tho

dapper sinew
#

this is the first im hearing about them letting people do that

ivory shadow
# pliant snow god it sucks

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

dapper sinew
#

i mean, im all for CC and MIT license but like... you cant just do that to someone who works hard on something

ivory shadow
#

(I mean wasn't that part of why the Minecraft community decided to leave and make their own platform?)

dapper sinew
#

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)

safe dragon
#

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

supple ether
supple ether
# safe dragon idk what labpbr is

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.

cinder karma
#

Never used a shader before but I can feel the format issues in my soul

safe dragon
#

can't be worse than the gltf spec

sonic mirage
#

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

safe dragon
#

imagine having projects worth stealing

sonic mirage
#

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

safe dragon
#

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

sonic mirage
#

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

safe dragon
#

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...

sonic mirage
#

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

safe dragon
#

and compiling for risc-v is much faster than x86...

#

probably cause x86 is a very large complicated spec with a billion instructions

sonic mirage
#

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

pliant snow
#

I think thats a lot easier said than done

sonic mirage
#

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

supple ether
supple ether
#

Prebuilts are such a scam

sonic mirage
#

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

crystal wren
#

That's exactly why I switched to that license! LGPL also did that job, but it also has some... baggage.

sonic mirage
#

People see GPL and just nope out

supple mountain
# supple ether Prebuilts are such a scam

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

supple ether
#

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

supple mountain
#

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

sonic mirage
#

I haven't bothered to put it together yet because I've just been playing Stardew, not exactly demanding

cinder karma
#

Is ff thr only game you care about

supple mountain
#

dhjsjdjsjsj no, but i would say it's my main squeeze

cinder karma
#

Tbh I've never wanted a GPU before now but <redacted cad software> can <redacted swear words>

supple mountain
#

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

sonic mirage
#

My current build is literally from 2008

supple ether
#

I play modded minecraft, which definitely uses my boost clock to it's fullest extent

sonic mirage
#

i7-920 OC'd to 4.0GHz, which is the only thing that has kept this viable for so many years

supple ether
#

Oh damn 4ghz is insane for 2008

supple mountain
#

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

sonic mirage
#

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

supple ether
#

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

sonic mirage
#

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

supple ether
#

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

pliant snow
#

Their IDE sucks, but the arduino CLI isn't half bad

tepid nebula
#

Used to try and play with 200-300 mods and it was absolute chaos, but definitely doable

fleet oriole
#

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!

ivory shadow
#

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.

worn remnant
#

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

fleet oriole
#

Thanks though, Khloe!!! You are the best!!!

sand frost
#

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

cinder karma
#

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

regal ingot
#

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)

deep drum
# supple ether Minecraft has chunkgen lag problems still with lots of mods installed, but consi...

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

floral crest
#

Grah

safe dragon
#

even a minecraft server is almost entirely singlethreaded

sonic mirage
#

Gaming performance in general prefers faster cores vs more cores

safe dragon
#

almost always yeah

#

exceptions are rare but do exist

#

usually simulation/rts games

deep drum
supple ether
deep drum
#

but also I know all the correct flags to set on linux, so maybe it's just me

supple ether
#

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.

deep drum
#

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

worn remnant
pliant snow
#

I'm always wary editing things like processor affinity or niceness, etc. It's dabbling in things mortals weren't meant to mess with

wise mason
# worn remnant > Maybe windows's scheduler just sucks? i hear it does (preferring cores 0 and 1...

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

frosty echo
lethal walrus
frosty echo
#

Yup

lethal walrus
#

is it bc you dont like the look of windows 10/11 or the telemetry? (or smth else?)

frosty echo
#

Yes

lethal walrus
#

which

frosty echo
#

Mainly the UI, but also the telemetry, forced updates, ads etc.

lethal walrus
#

ahh

pliant snow
#

I have a friend who skins his W10 to look like either XP or 7 because he says it makes it run faster

deep drum
#

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)

supple ether
#

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

deep drum
#

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

slender furnace
pliant snow
#

Are you saying he wasnt full of it

slender furnace
#

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.

cinder karma
#

Introwospection?

rotund violet
#

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.

safe dragon
#

the benefit is that it's compile time "reflection"

rotund violet
#

Yes, exactly. It adds to code size but costs almost nothing at runtime.

safe dragon
#

but to use bevy as an example it has its limitations

#

people tend to forget to add the derive for it

#

a simple one

rotund violet
#

Yeah, they do. For a lot of derives, you can add newtypes, and there are even derives to auto-derive for newtype derives (lol)

safe dragon
#

there's been talks to just add reflect as part of stuff like component I believe

rotund violet
#

But with Bevy's reflection that is admittedly a PITA since it's so complicated to implement manually.

#

Much easier with a Clone etc.

safe dragon
#

nothing beats the simple convenience and power of reflection in C#

#

do just about anything even if it breaks every rule C# otherwise obeys

rotund violet
#

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.

safe dragon
#

actually I'm in both

#

so are you I suppose

#

I almost never really use c# outside work

cinder karma
#

Overheard: "so apparently the order in which you select the options matter."

#

(The options are not correlated)

rotund violet
# safe dragon so are you I suppose

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.)

safe dragon
#

lmao

#

me too except with Javascript

slender furnace
#

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).

thin estuary
#

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)

pliant snow
#

Wow, how disappointing stardew valley doesnt support this smh

thin estuary
#

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

slender furnace
#

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.

thin estuary
#

both their Steam library and Vortex setup is on the D drive, and it's NTFS-formatted

slender furnace
#

Whats the problem about the NTFS format?

thin estuary
#

No problem with that

#

exFAT is apparently a problem, as it doesn’t have the concept of symlinks

#

That’s what I’ve heard

slender furnace
#

True, I guess exFAT inherits this from the old FAT format, because FAT16 and FAT32 also doesnt support symlinks.

cinder karma
pliant snow
#

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

slender furnace
#

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.

pliant snow
#

Readable isn't bad, but I don't trust the linux NTFS drivers or whatever windows passes as ext4 drivers

safe dragon
#

Windows has ext4 drivers at all?

#

I was under the impression that windows was entirely incapable of reading the ext4 format

pliant snow
#

3rd party ones i think

slender furnace
safe dragon
#

are there even alternatives to smb

#

I mean probably

pliant snow
#

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

cinder karma
#

Windows ext4?????

pliant snow
#

a fine way to lose data

deep drum
#

I use it to bridge my arch & windows installs with a common drive

pliant snow
#

tbh I don't think I've messed with it since they added the new drivers

safe dragon
#

it worked fine for me in the years I dual booted at least

crystal wren
#

I've never had any issues with it, but I still just inherently feel weird about it.

#

Same with the ext drivers for Windows!

supple mountain
#

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

ivory shadow
# cinder karma Windows ext4?????

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

supple mountain
#

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?

safe dragon
#

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

supple mountain
supple mountain
cinder karma
#

My gene is a date

#

My Spanish friends use commas wrong

rain apex
#

what would it take to switch to using postgres or similar?

sonic mirage
lethal walrus
safe dragon
#

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

lethal walrus
#

Ahh

supple mountain
#

you'd think microsoft would have built in like...... not completely fucking it up when files are shared by this point

sonic mirage
#

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

supple mountain
#

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

safe dragon
#

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

supple mountain
#

"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

safe dragon
#

I am glad I do not work in data science

supple mountain
#

my sister did the sensible thing and just did an engineering bachelor's before marching off into industry

safe dragon
#

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

supple mountain
#

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

safe dragon
#

😌

#

I did a bachelor's in comp sci and got out

supple mountain
#

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

cinder karma
#

I hear excel is a localized programming language

safe dragon
#

I wish it weren't

shadow wing
#

is anyone here knowledgeable with windows drive/partition management
im trying to clone my OS to another drive and am having difficulties

deep drum
#

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

safe dragon
#

we should abolish other professions

sand frost
#

Yeah, only mechanical engineers

#

Nothing else allowed

deep drum
#

the amount of crappy excel sheets I've gotten from scientists and researchers is enormous

sand frost
#

I once got an excel that was mysteriously 50MB

safe dragon
#

tbh my mom hates excel too and she was a math professor for an accountancy major so she pretty much lived inside excel spreadsheets

sand frost
#

when I exported just the data as csv it magically became like 50kb (I forget the exact size)

deep drum
#

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"

sand frost
#

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

safe dragon
#

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

deep drum
#

you can have it as a json file that I converted to base64 and you'll be happy about it

safe dragon
#

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

rain apex
#

do u think anything will finally break the excel monopoly

safe dragon
#

absolutely not

deep drum
#

I personally really like google sheets because I can make custom functions with JS

safe dragon
#

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

rain apex
sonic mirage
#

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"

deep drum
#

I feel very seen right now

sonic mirage
#

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!

deep drum
#

you hit the jackpot

#

I'll be dead before the PhD clients I work with say they were wrong lol

safe dragon
#

that's unheard of

lethal walrus
safe dragon
#

yes

#

that's the kind of ish

safe dragon
#

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)

rain apex
#

typing is a social construct

safe dragon
#

seems to be hc_pensive

#

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

pliant snow
#

nice, built-in buffer overflow

rain apex
#

js is extra cursed because unlike python it pretends typing mean things

cinder karma
#

Let me just do some questionable getattr work in python

safe dragon
#

unlimited power

cinder karma
#

Who doesn't love return getattr(self, test, lambda: logger.warn() or True)()

#

Just me?

safe dragon
#

I don't even know what that would mean

cinder karma
#

Basically, look up the function on myself that has the name specified by test and call it

#

If not found, log warning instead

supple ether
#

not that I would recommend actually doing that

pliant snow
#

Can you foreach over an Int32Array?

safe dragon
#

I'd assume so

#

I'm on my phone at this point

#

you'd have to find out yourself what happens

pliant snow
#

oh wait

#

apparently its case sensitive

safe dragon
#

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

supple ether
#

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

cinder karma
#

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

hardy storm
#

Not sure where to ask but since its governor adjacent: Is there an archive of past monthly xp leaderboards?

#

looking for may specifically

pliant snow
#

Unless internet archive happens to have one, no i dont keep any

hardy storm
#

Hmm. Any way to calculate how much xp is in 72 levels?

#

I'll dig back in to the github. thanks for answering!

pliant snow
#

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

hardy storm
#

Wow. Thank you. That is incredibly helpful.

crystal wren
pliant snow
#

I saw that lol

#

oh no. I didnt realize it was here

cinder karma
pliant snow
#

It's only slightly less likely, don't worry

marble jewel
#

sudo rm -rf /

pliant snow
#

its run0 rm -rf / now

lethal walrus
#

do you not need --no-preserve-root

pliant snow
#

I'll admit I haven't tried it

lethal walrus
#

should i ask what systemd is

#

ik it's a daemon but that's abt it

pliant snow
#

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

lethal walrus
#

ahh

pliant snow
#

its controversial lol

lethal walrus
#

and how exactly does it "accidentally" wipe /home?

worn remnant
#

by being very good at its 2349809 jobs /s

pliant snow
#

It's apparently a weird feature that was allowed to do so

safe dragon
#

ended up talking to one of those guys with an extreme hatred for systemd recently

rotund violet
#

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.

safe dragon
#

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

pliant snow
#

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

safe dragon
#

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

pliant snow
#

lol

#

ole Big Blue strikes again...

safe dragon
#

damn

pliant snow
#

all in one big package

#

how big is that package actually

safe dragon
#

7 grams

pliant snow
#

30 MB somehow

rain apex
#

not exhaustive

safe dragon
#

it's missing the systemd-tmpfiles from the article at least

pliant snow
#

is that not just tmpfs

supple mountain
#

it reads like a very elaborate Tumblr rant from ten years ago

safe dragon
#

all his articles read like that

#

there's also one on agile

gaunt wadi
gaunt wadi
#

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

pliant snow
#

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?)

safe dragon
#

why do they put everything in one giant package anyway

pliant snow
#

a good question

worn remnant
#

openbsd also replaced sudo (with doas) some time ago. i don't remember their reasoning, but it was probably security since it's openbsd

pliant snow
#

Ive been using doas as well, for no reason other than to just try it

pliant snow
#

@safe dragon You have 0.6% of the server's entire XP

supple mountain
#

@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

silk narwhal
#

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

supple mountain
#

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

silk narwhal
#

Oooooh

supple mountain
#

i'm actually editing the jsons for my mod in rstudio because it's just what i'm used to using lol

silk narwhal
#

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

supple mountain
#

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")

silk narwhal
#

I think I've got that last 60% down okay at least

#

At a passable level I suppose

supple mountain
#

but tbh that is mostly just listing caveats

silk narwhal
#

Definitely not at a "hire me for this level" I don't think though ahaha

supple mountain
#

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

silk narwhal
#

Oh perfect ahaha

supple mountain
#

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

silk narwhal
#

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

supple mountain
#

if only to be like DON'T SEND THEM AN EXCEL FILE at a cro or whatever

supple mountain
silk narwhal
supple mountain
#

@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

silk narwhal
#

I can see why communication is really important in such a field

supple mountain
#

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

silk narwhal
#

Mm, in that case I'll hopefully be able to hop into it without too much trouble ahaha

supple mountain
#

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

silk narwhal
#

Shiny app sounds exciting but I'm not so good at visualizing what it ought to look like

supple mountain
#

well, that's where the rest of the server comes in lol

silk narwhal
#

True! I've been thinking this could be a good thread topic actually

supple mountain
#

you're gonna want one or more (if more, relational) underlying datasets from which you draw tables and graphs and such

silk narwhal
#

:o I see

supple mountain
#

tidyverse is great for sorting things like that

#

piping!!!!! it's got piping!!!!!

silk narwhal
#

Okay, I'm starting to comprehend the vision and the power a little more

supple mountain
#

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

silk narwhal
#

I'm not totally sure it's within my reach though ahaha but I'll definitely try experimenting

red crest
#

so all in browser

#

(progress on that has been slow admittedly... Elden Ring calls to me too much, plus Dawntrail prep)

supple mountain
#

insane that i'm the final fantasy recipe mods person and i don't even play ffxiv

silk narwhal
supple mountain
#

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 😂

silk narwhal
#

Now I want to tinker with more things than just Stardew ahaha

#

Stardew is already a diversion from something else I was tinkering with....

supple mountain
#

the powers and good looking ness of Shiny apps remind me a bit of notion, actually

red crest
supple mountain
#

you can make notion templates public, if what you're looking to make would be made more easily with that

supple mountain
red crest
#

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

silk narwhal
supple mountain
#

people have actually made stardew perfection trackers and such within notion

red crest
#

people have sold perfection trackers and such with notion

supple mountain
#

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

red crest
supple mountain
#

i say steep - i think in the grand scheme of things, R is not that bad

silk narwhal
#

That sounds fun except for the part where I don't know javascript ahaha

#

So much to investigate!!

supple mountain
#

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

silk narwhal
#

Very exciting

supple mountain
#

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

red crest
#

if you know C# you can easily pick up JavaScript too
good luck with R though it's very different-

silk narwhal
#

(I don't really know C# I'm kinda hacking stuff together ahaha)

supple mountain
#

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"

red crest
#

that's what i mean. Once you know "how" to program, the grammar is the difficult part of learning any new language

silk narwhal
#

I'll try! Probably gonna be an on-and-off thing I expect

supple mountain
#

tidyverse is different than base R, but tidyverse is what works best with shiny apps so that's where i would start

silk narwhal
#

Yeah learning the grammar definitely sends me for a loop, nice to know that's kind of just a programming experience

supple mountain
#

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

red crest
#

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

supple mountain
supple mountain
red crest
#

stackoverflow is my best collaborator

supple mountain
#

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

silk narwhal
#

Noo

supple mountain
#

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

silk narwhal
#

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

silk narwhal
#

Yep

supple mountain
#

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

silk narwhal
#

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

red crest
#

(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

silk narwhal
#

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

red crest
#

make sure you double check the junimo pin about making threads i was just paraphrasing it when I told you about it earlier

supple mountain
#

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

red crest
#

(it has no relevance to me bc I am not a mod author so I just skimmed it)

supple mountain
#

the compilers you have to install yourself, ofc

silk narwhal
supple mountain
#

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

silk narwhal
#

Documentation :o

supple mountain
#

i think r documentation is pretty well-written

#

let me find a basic tutorial series to link you to

silk narwhal
#

I'll keep a note to self here to get back to this

supple mountain
silk narwhal
#

It's an hour that I ought not to start entering rabbit holes at

#

:ooo

supple mountain
#

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

heavy daggerBOT
#
supple mountain
#

maru does it again

atomic musk
#

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? SDVpufferchickcry

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?
}
thin estuary
#

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 +=

atomic musk
#

each event handles a different argument type, though

ivory shadow
#

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

atomic musk
#

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

ivory shadow
#

Do your delegates ever have different argument counts?

atomic musk
#

always the same count

cinder karma
#

(I'm also confused at the use case tbh)

pliant snow
#

I think its just a contrived example

cinder karma
#

Anyways

ivory shadow
#

Yeah this definitely seems like the XY problem to me

atomic musk
#

I've put so many design restrictions on myself it's giving me a headache tbh 😅

cinder karma
#

(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)

pliant snow
#

those XY tend to cause problems yeah

ivory shadow
atomic musk
#

😅

ivory shadow
#

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) { ... }```
atomic musk
#

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

ivory shadow
#

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

atomic musk
#

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

ivory shadow
#

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

atomic musk
#

but doesn't that just move the problem to having different TArgs?

ivory shadow
#

I assume you're calling the delegates at some point

#

Otherwise what's the point of them being delegates

atomic musk
#

I'm having a hard time visualizing using Action<TArgs>, so I'll just give it a shot lol

ivory shadow
#

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

atomic musk
#

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)

ivory shadow
#

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

atomic musk
#

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

ivory shadow
#

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.

atomic musk
#

hmm

ivory shadow
#

You're making a ton of extra work for yourself over just using two separate events

atomic musk
#

so like you said, dynamic is unavoidable, unless there's explicit type usage

ivory shadow
#

Okay so use 22 events

#

Events aren't some kind of limited resource

atomic musk
#

wouldn't that be hell to look at the API though?

ivory shadow
#

At least use one method per distinct call style

atomic musk
#

11 argument types, 22 events, 44 methods to add/remove those

ivory shadow
#

You could use overrides

#

Err wrong term

#

But yeah if you want pintail to work you need to do it that way

atomic musk
#

so the question becomes... which is uglier between lots of repeated lines of code, or dynamic?

regal ingot
#

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.

atomic musk
#

said better than I could SDVkrobusgiggle

rain apex
#

People using your api would probably pick 44 different documented methods that do 1 thing each

ivory shadow
#

Yeah. I would prefer that

#

If my code is going to break something I want it to break at compile time and not runtime

atomic musk
#

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

rain apex
#

That sounds 100% valid for weakly typed languages but C# is strongly typed Bolb

atomic musk
#

are my [weakly-typed language] roots showing? 😅

rain apex
#

Dw I would do exactly what ur thinking of in python too

#

It's probably even "pythonic™️"

atomic musk
#

JS actually, but I fell in love with Lua lmao

rain apex
#

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

atomic musk
#

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

rain apex
#

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

atomic musk
#

that's a valid point I can't argue with

atomic musk
ivory shadow
#

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

atomic musk
#

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

thin estuary
#

eh, i guess you could have Dictionary<whatever, Delegate> and cast the Delegate to the correct type each time, maybe

cinder karma
#

Sourcegen?

#

(I've done dumber stuff to avoid writing repetitive code)

atomic musk
cinder karma
#

::<>::<>::<>

#

' <- I crie

rotund violet
#

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.

cinder karma
#

Yeah. (Turbofish is perfectly normal generics. I just find the syntax hilarious)

#

The other comment was about explicit lifetimes

rotund violet
#

Yep, I think of that as part of borrowck but it does have a distinct wtf-ness all on its own.

cinder karma
#

Yeah

#

Not helped by the syntax

rotund violet
#

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.

safe dragon
#

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)

cinder karma
#

Don't get me wrong, I like Rust. But I reserve the right to poke fun at it

rotund violet
#

Same. Rust is my #1, or at least my #2.

cinder karma
#

If I can't mock a language what use is it

rotund violet
#

But that doesn't mean it's not hilarious sometimes.

safe dragon
#

I definitely have plenty issues with rust even if I like it

cinder karma
#

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

safe dragon
#

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

rotund violet
#

fn widget<'a, 'b, 'c: 'a+'b>(title: &'a str, content: &'b, style: &'c Style) -> Container<'a, 'b, Message> or something like that.

#

RRrrrrrRRRRRRrrrr

safe dragon
#

the moment I have to place lifetimes manually I panic worrying how far that will cascade down

rotund violet
#

Yeah, they're viral. But then, all Generics in Rust are viral.

pliant snow
#

I do everything I can to avoid defining lifetimes

rotund violet
#

Honestly, those things are funny, but probably the most genuinely frustrating thing to me in Rust is the trait coherence problem.

safe dragon
#

never return a reference ever 🙏

#

&str? who's that

#

String my beloved

pliant snow
#

And never pass self into anything

rotund violet
#

It's surprising just how much you can get away with returning only value types without noticeably sacrificing performance, memory, etc.

safe dragon
#

yeah

rotund violet
#

Avoiding references really is the answer like 90% of the time.

safe dragon
#

never let references escape the scope of the function

#

if you can

rotund violet
#

It's hard to completely avoid Box though because traits are 50% useless without it.

pliant snow
#

I honestly haven't used Box very much at all

#

But then again, I dont use traits too much either

safe dragon
#

Box<dyn Trait> my beloathed

rotund violet
#

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.

safe dragon
#

in the end once it compiles all that gets forgotten and replaced with surprise it seems to already work

pliant snow
#

Yeah, I've only written applications

#

or stuff that I'm the only one using the API for lol

rotund violet
#

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?"

safe dragon
#

the orphan rule, the enemy of library developers who want to provide support for other crates

rotund violet
#

^ that's what I really meant to say by trait coherence above, I forgot the exact phrase. Super frustrating.

cinder karma
#

And even when it doesn't work it crashes faster:P

rotund violet
#

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.

safe dragon
#

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

rotund violet
#

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.

safe dragon
#

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

rotund violet
#

It's gotten even crazier with Memory, Span, ref struct and so on. Very powerful stuff but you have to be very careful.

safe dragon
#

really only use span of those. Which of course technically means I use ref struct cause it is one but yeah

cinder karma
#

My biggest gripe with c# is the lack of safety rails when threading

safe dragon
#

I do love span

pliant snow
#

"My code doesn't use Memory" ~ Crumble

safe dragon
#

it doesn't anymore thanks to span bogaOwl

rotund violet
#

Parallel extensions and parallel LINQ are pretty convenient, but yeah, no safety whatsoever, you have to do any synchronization yourself.

modest steppe
cinder karma
#

And AFAIK no linter

rotund violet
#

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?

cinder karma
#

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

safe dragon
#

"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"

rotund violet
#

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).

safe dragon
#

sorry int isn't thread safe

safe dragon
rotund violet
#

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.

safe dragon
#

tbh almost no non-functional language that I've seen has compile time thread safety analysis

rotund violet
#

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....)

safe dragon
#

functional programming languages circumvent much of the issue by not allowing for mutation

rotund violet
#

Yup. No surprise that .NET started adding a bunch of immutable type support a few generations after all the fancy async support.

safe dragon
#

now we just need a good way to also guarantee immutability of the internal fields...

cinder karma
#

All roads lead back to Rust eh

rotund violet
#

Just use trai.. oh, right.

cinder karma
#

Then again

#

May I scare you with some python

safe dragon
#

always

#

I take any opportunity to get mad at python

cinder karma
safe dragon
#

that honestly just looks like funky reflection

pliant snow
#

If only there was a language with python-ish syntax, but static typing, and good out of the box library support...

safe dragon
#

nim isn't real it can't hurt you

rotund violet
#

It's more like JavaScript associative array fields on indexed arrays, I think.

rotund violet
cinder karma
#

I mean yes the example I linked was funky reflection

#

But in q type nonsafr way

#

And taking advantage of truthiness

safe dragon
#

though recently I had to implement something where it was vital to check for value equality in C# and I just about cried

pliant snow
#

And could compile to javascript for some reason

rotund violet
#

You mean... TypeScript?

#

Oh, I see, that's what you were hinting at earlier.

safe dragon
#

what's with languages compiling to Javascript

#

poor wasm

rotund violet
#

TS is actually good, though, the fact that it compiles to JS (really ES) is a necessary evil.

pliant snow
#

No I'm here to praise our lord and savior Nim

rotund violet
#

WASM might be the future, but it ain't the present.

cinder karma
#

Coffeescript

#

(I know it is dead I just lik3 saying coffeescript)

rotund violet
#

I remember Coffeescript! It was really popular with a certain contingent pre-TypeScript.

strange copper
#

What was the point of coffeescript because I did it once and I didn't get it but I was also like 14

rotund violet
#

There was also Google's JS compiler.

cinder karma
#

A certain contingent who also learned Haskell and didn't shower?

safe dragon
#

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

rotund violet
#

Typed or untyped, forget it.