11
retoor
24d

If you don't use AI for coding you're a kinda dinosaur. Cute, but that's all

Comments
  • 2
    o1-preview can answer questions

    gpt makes up answers

    like I asked it if you could look up if a hashset contains a hash in rust and it made up some dumb garbage that violates types

    o1-preview said no. though technically you could do it with unsafe code

    sigh. my ideas never work out in rust

    I didn't wanna use a hashmap. I just wanted the values to auto index and overwrite if existing. therefore hashset, yes? but then turns out I had a need to check if a key was unique somewhere else because of a bug someone else was handing me that was giving me values as new when they weren't new. so I needed to check if I already had the value in the set. but without doing expensive lookup stuff to make the object that's in the set. well fuck you I guess
  • 1
    @jestdotty Imagine that @SidTheITGuy was making fun of the 'thinking' of o4. You would think he would gain some experience before bashing it. The differences are big. Upgrade Sid, dinosaur :p * pet pet pet *

    @jestdotty it should have a upsert function that inserts if not exists yet. The thing you had to build yourself now. I think in low level languages they give you the bare minimal to work with. Bit weird because rust kinda feels high level with such std. Pick a side.

    Preferably you would extend the original HashMap thingy and overwrite the set functional that doesn't check 'get' value right? Can be fun?

    Maybe try your projects in C++, maybe it makes more sense. Would be interesting, a set of projects made with both languages with a summary of the experience
  • 0
    @jestdotty I mainly use for formatting / renaming and autocomplete. Barely use chat. I do often select code, do some ctrl+I and magic appears
  • 1
    @jestdotty what would be the name of a handicapped dinosaur in this case? I think the typosaurus
  • 1
    I don't think "AI" can build low-level code and work with off the shelf hardware which I enjoy doing, working with relays and sensors, robotic systems, and putting it all together, my next major project maybe a flight simulator (I'm still thinking about it), I wanted to build a simulator years ago but the hardware wasn't good enough.
  • 1
    @bazmd I'm sure AI can even help with that. It knows that if you just defined x, that you want to reuse x as parameter and stuff. It'll surprise you. If it's wrong, you type ahead. Try codeium, totally free, great performance.

    What hardware do you use for your simulator?
  • 4
    i'll stay cute :3
  • 1
    @jestdotty If you want to know whether an element is in a hashmap you have to do a lookup.

    you can use get_or_insert or one of its variants to only insert a value if it's not already in the set. If there's any meaningful difference between the two candidates but they compare the same and hash equal then that's a weird enough hack already that I think just checking the value in the set afterwards to see which one it is is a reasonable counterhack.

    If you can still change datastructures, consider switching back to a HashMap<T, ()> and using get_entry_mut.
  • 1
    @feuerherz and that's 'all'. You're the cutest tho 😁
  • 1
    @retoor If you look up Robospot, the idea is similar to that, except the servos have to take the weight of a person sitting inside it and be powerful enough to move it, LED screens have brought the weight down too and can be built into the simulator, even with the most basic controller board it can be programed just as easy as a robotic lighting system or a large telescope, I would have no trouble building a prototype with a local engineering company that I worked with on another project. They would build the frame, mountings and chassis, it would be built like an aircraft, I have lots of ideas about it...
  • 1
    > "I mainly use for formatting / renaming and autocomplete. Barely use chat. I do often select code, do some ctrl+I and magic appears"

    > "it's thinking omg!!"

    You just backtracked all the way to the start on the Gartner hype cycle?
  • 0
    @Hazarth I've just researched the gartner hype cycle and its key phases and do not understand your point :) But backtracking is fun, so yeah, totally did that!
  • 1
    this is stupid
  • 2
    @retoor it means that everyone is going to be charmed by the "magical o1" until they are not... The same way people were totally salivating ober gpt3 and gpt4 at their individual release until, months later, people finally realized It's not all that and It's actually barely useful for anything. Not sure why we have to go through this again for o1.
  • 6
    Fuck AI, fuck your opinion.
    I'll be a stegosaurus!
  • 1
    @Ranchonyx no, no, no. You're a typosaurus now according to sophisticated research
  • 1
    @mostr4am anyway, talk to your dad. It's so long ago
  • 1
    No thanks. Every time I use it, it causes me more work than if I had just done it myself.
  • 0
    @lorentz there's still a difference between looking up if a key exists and also getting it's value (additional memory accesses etc)
  • 1
    @devRancid If you don't use the value, the load is optimized away. Rust is a static language that uses LLVM, you can count on these things. You always have to load the key because the same hasher state could be produced by a different key too.
  • 3
    I’m still resisting. I want to be the last dinosaur alive.
  • 3
    Eh, AI is sometimes useful for little self contained things I'm too lazy to write myself

    For actual programming work it's kinda useless since it doesn't know your code base and how everything should integrate
  • 1
    @jestdotty This really sounds like a hashmap from the data you're actually considering for equality to the whole object would be a better fit. Generally, equality should consider the whole object. It's not necessarily wrong if it doesn't, but it's a caveat to consider for further decisions because datastructures are designed with the assumption that equality is total.

    also check out the raw entry API that's available on unstable and in the Hashbrown crate. Hashbrown is identical to the std hashmap, it's literally imported by std, but std hides the raw entry API because it's kind of contract breaking.
  • 2
    @jestdotty Hashing in Rust just means deriving a value from every observable aspect of an object, hasher states can be small and in particular hashmaps usually use a very small hasher state and truncate it to an index anyway. A hashmap lookup involves jumping to that index, then going through every key with the same truncated hash and comparing each of them with the lookup key for equality.
  • 1
    @cuddlyogre your name is already cuddlyogre, that's fine. I don't have to invent a dinosaur name for you :)
  • 0
    You can also define a borrowed version of your object. If you implement Borrow and the equality traits, you can use the borrowed version as a lookup key. If you also implement ToOwned, you can use the borrowed version with get_or_insert and it'll be converted only if needed.
  • 2
    @Biggy oké, you're a capisaurus then
  • 0
    @jestdotty actually, check out HashSet::get_or_insert_with, it can be used for what you want. You can define a boolean flag and set it in the converter function to detect that the new value was inserted.
  • 0
    @12bitfloat you're totally, totally wrong. Not used AI for long time. I can imagine if you say code generation is useless, but it goes beyond that. The other two points are totally opposite. It knows your codebase and it predicts integration quite while. Use codeium for a a few hours and you'll proof me right. Until then, you're a resistosaurus.

    Not only AI will know your codebase, the whole world will know. Made possible by FREE AI 😂
  • 2
    @retoor I know all this about the Rust API because whenever I get stuck I scour the docs for the building blocks I need and learn a ton of unrelated stuff in the process.
  • 1
    @lorentz that's why I never read the docs, I'm never stuck!

    J/k
  • 0
    @jestdotty A Rc/Arc maybe?
  • 3
    @lorentz I remember when I could straight up read the whole docs for 4 hours and remember everything

    now I get lost cooking so I had to take notes and mark the steps with checkmarks because brain damage -.-

    hopefully I'll recover one day...
  • 1
    I've tried chat, but not autocomplete. all the experiences I've had so far with AI were charming, but didn't have good results, so I'm not fully convinced it's useful.
  • 0
    @darksideofyay it's advancing rapidly. I swear by it now. Try codeium for vscode to get an up-to-date experience. The AI from previous month is not the AI of today. Much advancements.

    Main difference: normally a word is auto completed. Now it auto completes a line with your casing of variable names and most likely exactly the variables you want and maybe even the value you would expect. Tbh, it's freaking many times right. Almost magic. These are my stats: https://codeium.com/profile/... (One day i had 608!!! completions. I assume it only counts accepted completions, else it's nothing)

    But i have no idea what percentile means. I code freaking a lot, maybe i'm in top users or smth. Did had the plugin disabled for some reason i just found out.

    AI is worth it to retry from time to time
  • 0
    @darksideofyay

    Own example, it sees that this one is missing in the list and it auto completes the whole if statement. It even helps me prevent a mistake by forgetting it. it's free btw
  • 1
    @retoor "switch" together with the enum check by the compiler exists...
  • 0
    @iiii yes, i'm aware and it's badass ugly and dangerous
  • 1
    @retoor it's not
  • 0
    @iiii I thought you're advising me to use switch statements. If you mean something else, tell me. I don't understand in that case
  • 1
    @retoor I forget where the chat where I interviewed you was

    how do you get your daily programming tasks to fit neatly into that day so you have a full feature end of the day? like clean breaks somehow
  • 1
    @jestdotty it wasn't my answer but I also make sure my feature doesn't last a day, I break it up in multiple components in that case that I all see as a deliverable. The interview was about finishing side projects in general iirc. The answer was to keep it fun by rotating a few projects. That rotation period can be a few hours to two days. I don't work longer on same project longer than two days in general. It's just the time that I get a bit tired if certain type of project and move on. It's not really planned, it's just how it is. I'm in a finishing phase currently, I finished a few projects. Was about time!
  • 1
    @retoor ok so it's more accurate that it's not about time but you knowing how long until you're bored of that project and switch

    so the chunks have to be small enough that you don't get sick of the thing you're working on

    ok that's helpful
  • 1
    @jestdotty also, by rotating regurarely, you're always looking with fresh mind towards the project. That's a big noticeable plus!
  • 1
    @retoor after the job I had I "broke". I spent a lot of time forcing myself to code so it's habituated that I force myself which makes me honestly not like it anymore

    this is honestly a real calamity. before coding was literally better than video games for me and I was so excited when I found it. and I spent my whole childhood playing basically every video game that ever came out!
  • 1
    @jestdotty code is way more fun than gaming for me. Putting brain to work gives me the idea of doing smth usefull and that gains more dopemine than anything else. My end products mostly are useless but I consider trained brain also an end product. Gaming doesn't have an end product for me
  • 1
    @retoor yeah

    well I got brain damage anyway so so much for all that brain training I did. I used to smoke weed and downloaded basically all the STEM Wikipedia pages over the course of like 3 years into my brain and now none of that shit is even in there anymore. thanks, life
  • 1
    @jestdotty yeah, that's what I had for 1,5 years due medication, brain issues. Now I'm getting a bit used to it and brain is running and enjoy it every day. I was a zombie
Add Comment