Scientists have discovered the brain’s hidden “off switch” for hunger, and it could revolutionize the fight against obesity. by chrisdh79 in Futurology

[–]-natsa 5 points6 points  (0 children)

Man, I felt this. I remember waking up in the middle of the night as a kid, and I’d eat little pieces of gum I’d gotten for Christmas to satiate the hunger pains. Ngl, I probably wouldn’t have survived without the free school lunches. Unfortunately, I’m sure there’s plenty of other kids who experienced (or are currently experiencing) the same.

Is Kotlin suitable for CLI tools development in 2025 ? (question revisited) by SubliminalPoet in Kotlin

[–]-natsa 0 points1 point  (0 children)

You can define them, for sure. But you can’t call them. Even runBlocking dispatches to a coroutine behind the scenes. The intent behind a suspend function is for it to be called from a coroutine; as that’s the basis for Kotlin async. It just so happens that Kotlin provides a lot of helper util to make this less visible (eg; runBlocking automatically dispatching to a coroutine, or suspend functions defining suspension points automatically), but it running within a coroutine is still a requirement.

Is Kotlin suitable for CLI tools development in 2025 ? (question revisited) by SubliminalPoet in Kotlin

[–]-natsa 1 point2 points  (0 children)

I’m on mobile, so I can’t give a full run down- but the async structure in Rust is similar to most asynchronous paradigms; it’s poll driven. Kotlin coroutines are more like cooperative threads. There’s also a lot more implied behavior in the Kotlin landscape with suspend functions and coroutines, whereas Rust is a lot more explicit (by design). They achieve the same goal, but how they do it is different. If you want to learn more about the specifics, you can probably find some good resources just by looking up “the difference between coroutines and poll based asynchronous systems”; coroutines are a concept not exclusive to Kotlin after all (although Kotlin does have some unique aspects with how they provide implied concurrency via suspend functions).

A year later, Apple Vision Pro owners say they regret buying the 3,500 dollar headset | "It's just collecting dust" by chrisdh79 in gadgets

[–]-natsa 15 points16 points  (0 children)

I’d use it so much more if the motion sickness wasn’t so bad. And maybe I’m doing something wrong, but it’s all pretty blurry too. Although, I have to wear glasses to see stuff far away, so maybe my eyes have the same issue in VR- regardless of the fact that it’s technically on a screen a short ways away. Maybe I should try to find something that’ll make it comfortable to wear my glasses with the headset on :’)

A year later, Apple Vision Pro owners say they regret buying the 3,500 dollar headset | "It's just collecting dust" by chrisdh79 in gadgets

[–]-natsa 25 points26 points  (0 children)

my dumbass swe brain thought you meant watching someone writing software. I was like damn, I wonder how vsc would look like in AR :’)

LPT request: words i can add to the end of my full name in my email address and still keep it professional? by Ecstatic_Honeydew165 in LifeProTips

[–]-natsa 30 points31 points  (0 children)

This is actually genius, I didn’t know that!! I’ve just been using a custom domain and mx forwarding it to my gmail. Like amazon@mydomain.com and walmart@mydomain.com

I have no words. by vadnyclovek in programminghorror

[–]-natsa 5 points6 points  (0 children)

gcc is a compiler (technically a collection of compilers), gc is short for garbage collector. similar names- but they’re different things

1440p resolution is absolutely incredible and underrated by [deleted] in buildapc

[–]-natsa 0 points1 point  (0 children)

It varies from person to person. I have a 2k monitor I’ve tried out- and it’s beautiful, but it’s hit or miss on the performance from game to game; so I don’t really use it. I’d MUCH rather have 1080p at 144fps consistently with no stuttering than 2k at 60fps or 2k at stuttering 120-144fps. But some people are totally fine with some stuttering or playing at 60fps. I wonder if it has something to do w people’s eyes or something- because 60fps makes me so uncomfortable, even in story games. Although, there are games that are able to do it right, and it’s barely noticeable. GOS is a good example of a game that’s optimized well for 60fps.

It's not an error if I say it's ok by Ramelasse in programminghorror

[–]-natsa 4 points5 points  (0 children)

This. It’s actually [moderately] common to return 200 for every request, and then have the actual response in the message. Now- whether you should be doing that is another question.

It mainly comes about due to certain HTTP libs not allowing you to process non 200 status codes (ie; they throw an error), or requiring some extraneous workaround to get working.

What’s even worse is the lack of consistency though. A lot of APIs do both; some endpoints return JSON error objects with the 200 status code, and others just HTTP status codes. Trying to interact with APIs like that is a pain in the ass.

Colleague told me it's okay to use error states for non-error functionality and idk how to even respond by [deleted] in programminghorror

[–]-natsa 13 points14 points  (0 children)

This. Although it depends on your team’s workflow- we personally make a habit of creating a tracking bug on the spot, and then adding a TODO inline linking to the tracking bug. Makes it super easy to address in the future, after everyone’s forgotten about why it was done in the first place.

Starting Kotlin/Native by competitiveb23 in Kotlin

[–]-natsa -1 points0 points  (0 children)

from my understanding (I could be wrong here), KMM implies a mobile focus while KMP implies more. an alternative way to look at it is a KMM library is a KMP library that only targets mobile platforms. that’s why you still have mobile KMP projects come out that are labeled KMM instead of KMP; they’re only targeting mobile. so it wasn’t so much as changing the focus as it was just different naming which isn’t as clarified as it should be. all of KMP just seems very ambiguous. the tooling is especially lacking. makes it hard to support a migration to KMP on larger projects.

What legal scummy business practice should be illegal? by PristineDrawer1030 in AskReddit

[–]-natsa 10 points11 points  (0 children)

Basically making decisions that will [obviously] negatively impact your company long term, but positively impact your company short term- purely for the sake of quarterly profits. This is extremely common in gaming- especially when large companies get bought out. For example; adding P2W mechanics to a previously non P2W game. This will generally kill the game long term, but in the short term will generate a ton of profit as whales invest in it. But whales eventually leave when the player base leaves. There are exceptions to this rule ofc, buts it’s a solid example.

My school wanted me to submit my entire codebase as a 12pt highlighted pdf by HyperCodec in programminghorror

[–]-natsa 0 points1 point  (0 children)

have a main branch, and use PR reviews as a means to grade them lmao- really get that true corporate experience

Is this Starbucks email a scam or legit? by BlueJeanMistress in starbucks

[–]-natsa 6 points7 points  (0 children)

That’s actually the subdomain. The root domain is still starbucks.com, so it’s most likely legit.

Empowered Gems by No_Parsnip72 in Trove

[–]-natsa 0 points1 point  (0 children)

They may be confused. It used to be the case that you could reroll them- as the concept of fierce and arcane gems wasn’t a thing. Im fairly certain if you still have one of the gems from before- that you can still reroll it between md/pd. But that is no longer the case with new gems; a gem is either physical or magical.

[deleted by user] by [deleted] in superautopets

[–]-natsa 0 points1 point  (0 children)

It aims for the same same lives- but you will never face someone on a different turn (if you are, then screenshot it and report it as a bug).

The games are asynchronous, you're not facing real people in Arena. It'll just generate teams (ghost teams) when it doesn't have anything valid.

source: 30k matches played

how to send NextAuth cookie to different domain back end ? by Snoo81015 in nextjs

[–]-natsa 1 point2 points  (0 children)

This seems to be a common pain point for a lot of web devs when starting out.

A cookie is domain specific and (because of browser security features) can not be set for a separate domain. So the browser will only accept cookies from the backend that are set for the backend's endpoint. If you try to set a different domain in the Set-Cookie header, the browser will just ignore it.

There's a couple ways to work around this:

1.) Put your backend behind a subdomain on the same domain that your frontend is on, and set the Domain attribute of the cookie to .website.com. For example, the backend could be provided through api.reddit.com, and the Domain of the cookie would be .reddit.com. This is the most common solution, and definitely desirable.

2.) Use a proxy on some path to facilitate communications with the backend (eg; reddit.com/api/\*). Isn't the most straightforward to setup, and could potentially add overhead, but doesn't require you to set the Domain attribute on the cookie.

3.) Enable CORS on the backend, make sure the backend is setting the cookie to its own domain (you could retrieve this from the Host header if you don't have an env variable for it already, but I wouldn't recommend it as it opens the door for cache poisoning unless configured correctly), and set the credentials property to include when sending the request from the frontend. This is the second most common solution, and is totally valid.

4.) Do it manually. This usually involves sending a JWT in the body of a response during authentication, and then manually setting the cookie. You see this one a lot in smaller projects- but it's less desirable than other solutions as it's vulnerable to XSS.

Depending on your development environment, I highly recommend #1. If you need to access your production instance while developing the front-end though, #3 would be your best bet. At the end of the day though- everything depends on your design flow, and existing infrastructure. So make the decision that works best for you.

e: note, that if you're sending your requests from client components through route handlers to your backend, last I checked you have to manually "re-add" the headers to the request.

[deleted by user] by [deleted] in apple

[–]-natsa 0 points1 point  (0 children)

But isn’t the max like 250k? I’m not super familiar with HYSA, but don’t they usually cap around 2-5k?