1
jestdotty
15d

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
    @retoor TF is a double key?

    like a float as a key?
  • 1
    @jestdotty {"pony" :1,"pony":2}. Two times same name in an object
  • 0
    @jestdotty how's your llm adventure?
  • 1
    @retoor brief then drank coffee and went to talk to people about etheric possessions in a place called the asylum 😁
  • 1
    @retoor getting a model and just pinging it seems lame. also heavy

    there's a guy who calls himself a nephilim and he gave some weird version of steampunk as an idea and I tried to ask him if he'd wanna partner up and build a game. I don't think he knew that that's where I was going. maybe I'll ask him about his universe / for him to keep dispensing schizophrenic ideas to me and use that as a rubric for a RPG or something. seems like that would lead to better things than LLMs

    there's a website called Blackbox and it has sonnet in it so I can still ask questions. the NL guy kept deleting his discord server that had the AI bots in it. I forget why he lost it at me last time. now he adds me and just insults me and doesn't seem to want to be accommodating so I was irritated cuz I like being able to ask AI questions. but again not all AIs are made equal

    I have too many projects for something that would be so annoying to work with reeee
  • 1
    @retoor last 24 hours all the USA election stuff went nuts. all my channels blew up so been mired in that and thinking about spiritual things. also made some money off it

    anddd my period started and that caused odd metabolism issues and activated the autoimmunity issues so I've been generally miserable. tried to eat raw honey and maybe that made things worse idk, it also could've made them better theoretically tho

    otherwise I need to still fix my stupid address miner. I've been in a rewrite but I keep finding more bugs. brain good enough to notice them now I guess, but then I eat chocolate or have dinner and then it's not and fuck you

    I also wanted to take a vacation and play screeps like a retard. like smoke weed and just write horrible things because I've never done that before, so it would've been fun. but ended up never happening

    and I still have to clean the apartment. ceased that for now

    fuk why. oh yeah my nails ended up chipping and I have bruises on my knees thats why lol
  • 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
    @retoor well roomie left it... so Ive had to come to terms that I have to clean years of grime I didnt make

    this guy literally would passive aggressively put his boogers on the walls. he's fucking older than me. I can see in the reflections in the sunlight Im gonna have to get on a chair to be able to take snot trails off. he literally walked down the hallway and rubbing snotty fingers as he walked. and he was taller than me so I'm gonna need a fucking chair and basically get up to the ceiling. this whole thing is literally just making me depressed. his ass just dunked on me. I'd set something of his on fire but he owns nothing -- he leeches stuff off his parents, and his new place is the same landlord and I like our landlord so I don't wanna harm his stuff. grrr

    I cleaned the worst of it. God it was so bad

    yesterday I had an interesting epiphany that might make things better. seems I've ceased being enlightened about suffering somehow. unsure how that happened. brain damage I guess
  • 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
  • 1
    @12bitfloat interesting and also that's a good perspective. I like it

    before I thought options were inefficient but you proved me wrong!
  • 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?
  • 1
    @tosensei you're using human heuristical thinking instead of understanding how the code is converted in machine-known states, which are rigid, exact and not intuitive / heuristic like human thinking is

    you're also viewing programming like you're a user of it instead of an architect that actually knows how things work under the hood but I'm just being a bitch now cuz I find you annoying
  • 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 your lack of intelligence should be embarrassing

    this is actually not a bitch comment but a compassionate one btw
  • 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