#Keder's Rust Grind atleast 30 mins a day
127 messages · Page 1 of 1 (latest)
@remote lotus u gotta say why I'm confuseeed
Because Rust has a lot of concepts that you are not familiar with when coming from Python
gotta learn about manual memory management n shi
yeah thats what ill start from
borrowing system
i believe i did python for enough
@remote lotus realised rust is not for me
i cant even manage to add a crate
OH WHAT
WHEN İ DİD CARGO RUN İT WORKED
Okay guys rust is for me
dont worry
cargo add name
yeah i aded it
but iw as runing the code with rust compiler
instead of cargo run
I've touched rustc like 3 times during my (limited) Rust experience 🤣
cargo just works
learned how to not handle memory managment
yes
i had to use sqlite
cause i had to move value
i couldn't get the value back
what
if i clone do the values match even if i add new stuff
Clone creates a copy of the value at the point in time when you are cloning
eh then its not useful?
@remote lotus
lets say i got a list i append msg id to
then how do i acess it back again?
cause i move it
You clone the message ID when appending and then the copy is moved into the list
And you still have the value
Yeah
I believe the first move occurs when you print, no?
Is it necessary to spawn a blocking thread here?
yes otherwise it stops
and i want this task to be another task when im gonna do bigger file uploads
so app doesnt stop
I guess you're building something similar to Discord?
what?
What is it you're building here
just a python project i had before
basicly using serenity
to uplaod file
and get their id
s
saved
gn guys
Done :)
im just so smort
used copilot for this messageids arc mutex thingy
idk what does it evne do
Well i used Google to check
It said makes it only editable by one thread
Okay I readed an article
Arc = good
Jk
Atomic reference counter
progress :)
now the app can upload/ and download it back
oogood lucj
thanks
hah update
now i know how to use sqlite with rst
can return the files now
cui?
yeah u can kinda control it
i found this on cargo
iinquire
I was shocked when there was no input on rust
So I searched a bit
Is rust oop?
Yesn't
I'd say it has more functional influences than OOP influences but there are structs with methods attached to them (also look at the trait system please you will love it)
You are inspiring me Keder, I might have to start my journey soon