2
jestdotty
48d

ping REST API that is written in rust

it has specs. it will return json with result or error in it.

it's just returning result: null and no error

this is written in rust. how are you writing me responses with null objects in them? rust doesn't have null! how broken is this thing.

SAFE

Comments
  • 2
    but rust has `Option`, which is basically a nullable, but with the extra step of "naming it something else so we can still claim rust has no null".

    and maybe "no result" is just a valid possible result?

    and after all, if the response is supposed to be in json.. don't know if you heard of this yes, but - json HAS null.
  • 1
    Also, just null, true and false alone is valid json, without any brackets / braces around it.

    Another fun fact, json does allow double keys by spec. Interesting since a js object does not. It should've been called jsishon
  • 1
    @jestdotty {"pony" :1,"pony":2}. Two times same name in an object
  • 0
    @jestdotty how's your llm adventure?
  • 1
    @jestdotty watch the anonymous official channel on YT, funny content, a lot of true information but the dots they connect us just crazy. It's complotty. They releasing this shit because Trump became president. They're happy about it - I always thought they where far left because theyre quite ethical. But appearantly only about important at least not woke.

    Wow, blackbox is really fast. But don't know what sonnet is. I thought that deepseek was the best in some research of people who use it. You can host yourself, 133gb and 250b or so: https://ollama.com/library/...
    But in general, AI uses more ram than it's own size, if that's true, you need 133gb memory? There's an online version ofc. Ever tried it? Also, codegemma is worth a try.

    Saying being a nephilim is quite a statement, nearly psychotic.

    My periods are a breeze, almost unnoticed. Almost doubt how healthy that is.

    Clean appartement is more important than anything - it really reflects your state
  • 1
    @jestdotty if you don't care about state of appartement enough to clean it up or having too much issues with cleaning it up, there's smth not alright. More than a year ago, my home state wasn't ik but I said I don't care about it enough. Not caring about it enough is not good. I'm not talking about hygiene stuff, but about your mental state. My house is perfectly clean in the sence you only see stuff I'm using, besides that empty. No stuff laying around. But when it comes to hygiene, I wouldn't lay down on the ground here 😂 I walk with shoes inside and barely vacuum. I only care about not having stuff around. I have one drawer that I put all misc articles in, not used laptop, keys (never lock my door), vapesticks, chargers, cables. For big things (like I have two chairs to much imo regarding space I have a second bedroom with three beds where I store it. It's my dressing room. Boxes are stored nicely on a bed. So the living areas looks empty :) it's very relaxed, people notice
  • 1
    @jestdotty after being homeless I did decide that I don't need stuff anymore and that resulted in not owning any stuff I don't need. I never buy smth. Not having stuff is great. The things I do own are stored at my parents, a complete furniture for example. So I ended up on street, having money and furniture but bank blocked a while my account because of the situation. So, I had everything but not a house. Friend donated money to survive. That was great, never wanted the money back, refused. Got 2000,- just as gift
  • 0
    @tosensei Option ISN'T null

    There's really two main points here:

    * nulls suck because traditionally (before nullability) they encoded an additional, likely invalid state for each of your reference types. It might be a valid House... OR it might be null. And you have no way to prevent that besides null checks literally everywhere. Option doesn't suffer from this issue

    * Option being a separate type means you can have composing methods like .map(), .filter(), .and_then(), etc. which help make the code shorter and more readable than a bunch of nested ifs or whatever
  • 1
    @jestdotty boogers on the wall.. Never heard of that. It's very weird. I just keep sniffing until I get light in the head like a normal person and then I sniff one like I do
  • 0
    @12bitfloat "they encoded an additional, likely invalid state for each of your reference types" - that statement only holds true if you don't KNOW that NULL exists, at all.

    aka: you have no clue of the basics of the programming language you're using.

    which, in low-level languages like C, opens up much deeper chasms of terror than a simple null-pointer ever could.

    as for composing methods: that's just syntactic sugar that you could add to any language with null values, even without adding a specific type.
  • 1
    @tosensei No, it encodes an additional value whether you like it or not, which is exactly the issue with null

    A function clean(House house) HAS to contend with the possibility that the passed house isn't actually a valid house. So you either have to do a null check everywhere or (like most code actually does) just assume you aren't passing in null

    Either way, this makes for less robust and more complex code
  • 0
    @12bitfloat when you know that in your language, an int is nullable, then null is not an _additional value_, but a perfectly valid value for that data type.

    just like `infinity` and `NaN` are valid floating point values if your language implements them.

    or to keep in your metapher: the complete _absence_ of a house is still a valid house, while a car isn't.

    you just gotta be aware that your language of choice can provide you with an unclaimed building plot (instead of moving over the next house in the street, to fill in the gap)

    maybe it helps you to think of an int as `Option<int>` (or `Nullable<int>`) as default, so you just don't forget that null exists?
  • 0
    @jestdotty nah, you're being a bitch always cuz you simply are one, i guess.

    in fact, i'm doing the exact opposite of what you're alleging.

    i'm viewing a programming language as "it does what it is technically designed to do". and if the _language_ says "an integer can be null, unless otherwise stated", then that's what the language is.
  • 0
    @tosensei I understand null exists and it can be a useful value; *sometimes*

    But ALL of your code could have a null reference even when you absolutely, definitely want to hold a valid, non-null reference to a house which won't crash your program when you dereference it

    The more invariants you can encode in the type system the better, because then these bugs can't even happen in the first place
  • 0
    @tosensei Also an additional benefit even over languages with nullability: Option is composable

    If you have a list generic over nullable ints and a method "get" which returns the value or null if absent, the return type collapses to just "nullable int" when it should be "nullable nullable int"

    This makes sense but now you don't know whether the value was absent or whether it was there but null. With Options this would be Option<Option<u32>>. And if you don't care then you can call .flatten() on it, which makes it into an Option<u32>. But you have the choice
Add Comment