Guild icon
DDraceNetwork
DDraceNetwork / off-topic
Any languages allowed
Between 2023-01-17 00:00:00Z and 2023-01-18 00:00:00Z
Avatar
bro we've got 50km/h winds right now justatest
00:03
my internet hardly works :<
Avatar
@MilkeeyCat poggers2
Avatar
Congrats
05:06
Now dedicate half of your life to one design language and think all the others are shit
Avatar
Avatar
Blade
bro we've got 50km/h winds right now justatest
That's only 14m/s in Chad units. Rookie numbers 🀏
Avatar
Avatar
Anime.pdf
@MilkeeyCat poggers2
Should i do the same? :D
Avatar
Avatar
Anime.pdf
@MilkeeyCat poggers2
Maybe you have veryyyyy basic chat server on rust? 0_o
08:49
BASEDDEPT
Avatar
umm, I’m still not sure whether or not carrying that case during spring festival holidays x.x
Avatar
Avatar
MilkeeyCat
Maybe you have veryyyyy basic chat server on rust? 0_o
I dont use rust (usually), so no, i dont
Avatar
Ah gg
Avatar
What do you need it for
09:31
Why even rust
Avatar
My little monke brain cant handle how this focking threads work and that the fuck i have to do to make it work
Avatar
Avatar
Anime.pdf
Why even rust
What should i use instead
Avatar
Avatar
MilkeeyCat
My little monke brain cant handle how this focking threads work and that the fuck i have to do to make it work
Create thread, place function inside it, even anonymous one fits and detach it, to make it work without interrupting main threadjustatest
Avatar
Avatar
MilkeeyCat
What should i use instead
What for, basic chat? Anything, every language will do
Avatar
Avatar
Anime.pdf
What for, basic chat? Anything, every language will do
Im doing it as a chat
09:35
But in few lines of code it will turn into useful shit for my website
Avatar
Avatar
Anime.pdf
Create thread, place function inside it, even anonymous one fits and detach it, to make it work without interrupting main threadjustatest
Aaand i have to use shared data
Avatar
Avatar
MilkeeyCat
Aaand i have to use shared data
Use mutex or atomic
Avatar
Reading about mutex rn
Avatar
Avatar
MilkeeyCat
Im doing it as a chat
Well you can do it in smth like js or python, right, there must be lots of tutors monkalaugh
Avatar
And then spending time to find how to make an executable from it
09:43
Nah, much easier to spend 10x more time with rust
Avatar
Why do you even need it as executable bruh
Avatar
I will show when i will do this
Avatar
You sure you need this as executable? It seems as a very bad way of doing anything
Avatar
Avatar
Anime.pdf
You sure you need this as executable? It seems as a very bad way of doing anything
Then... I will rewrite everything ;p
Avatar
Sounds good greenthing
Avatar
Lumpy ◐ω◑ 2023-01-17 10:44:31Z
looks like the kitty is up to no good
Avatar
Avatar
Anime.pdf
Sounds good greenthing
Dear diary, I can't find words to describe the pain and humiliation I experienced. Ive been debugging my 20 lines of code program for 1.5 hours and then I realized i was locking mutex and it was unlocking
Avatar
Jupstar βœͺ 2023-01-17 13:02:59Z
Use unique locks
13:03
Only in very certain situations u need to use unlock lock directly
Avatar
what Jupstar says ^^
Avatar
I fixed program just by swapping sides 2 lines of code
13:08
Dumbest bug ive ever had :(
Avatar
Or scoped_lock/lock_guard
13:09
If you don't need to unlock before the block ends that is
Avatar
aand one last recommendation to finish it: https://www.rust-lang.org/
A language empowering everyone to build reliable and efficient software.
17:42
BASEDDEPT
Avatar
Avatar
Ryozuki
aand one last recommendation to finish it: https://www.rust-lang.org/
Jupstar βœͺ 2023-01-17 17:43:28Z
thanks for sharing
Avatar
@MilkeeyCat r u making a tcp chat?
Avatar
kinda
Avatar
naive way is to make a thread on each incoming connection
Avatar
that's what i did..
Avatar
Jupstar βœͺ 2023-01-17 17:44:27Z
the non naive way is to use tokio
Avatar
now make it accept 100k users
Avatar
it wont be a chat anyways
Avatar
Avatar
Jupstar βœͺ
the non naive way is to use tokio
how did u know
17:44
BASEDDEPT
17:45
A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ... - tokio/chat.rs at master · tokio-rs/tokio
Avatar
Avatar
noby
select()
iirc this is posix only
17:46
so wont work on windows
17:46
thats one of the things of c++
Avatar
Avatar
Ryozuki
how did u know
Jupstar βœͺ 2023-01-17 17:46:39Z
bcs i am rust elite
Avatar
Jupstar βœͺ 2023-01-17 17:46:50Z
17. days of tryharding
17:47
end of february i am master
Avatar
ah well it was too broad of a question
17:47
u need 2 includes
17:47
ifdefs
17:47
and idk if the sig is the same
17:47
poggers c++
Avatar
if u dont want async in rust u can use mio
17:50
which is what tokio uses
17:50
Metal IO library for Rust. Contribute to tokio-rs/mio development by creating an account on GitHub.
Avatar
Jupstar βœͺ 2023-01-17 17:53:27Z
only thing i dislike so far, is that it has no condition variable
17:53
(tokio)
17:53
really sucks
17:55
Summary (Hi. This is my first issue/MR against Tokio, so firstly: Hello and thanks for all the hard work making an impressive system!) I need a condition variable. (I am updating a program from Roc...
17:56
u can use this
17:56
its not exactly condvar
17:56
but maybe u can achieve it
Avatar
Jupstar βœͺ 2023-01-17 17:56:08Z
it doesnt unlock a mutex tho
Avatar
Jupstar βœͺ 2023-01-17 17:56:13Z
yeah
17:56
but i dislike workarounds
17:56
thats the whole sense to use rust xd
17:56
idk why no condvar
17:56
make a pr
Avatar
Jupstar βœͺ 2023-01-17 17:56:50Z
true xd (edited)
Avatar
Avatar
Jupstar βœͺ
true xd (edited)
unlike c++ here its kinda feasible
17:57
u probs need to join a council of elders in c++
17:57
to change stuff
Avatar
Jupstar βœͺ 2023-01-17 17:57:23Z
true xDD
Avatar
@Jupstar βœͺ i think sets in c++
17:57
took 20 years
17:57
to have .contains()
17:57
llmaoo
Avatar
Jupstar βœͺ 2023-01-17 17:57:53Z
xDD
Avatar
literally the usecase for sets
Avatar
Jupstar βœͺ 2023-01-17 17:58:00Z
yeah
17:58
@Jupstar βœͺ c++20 only
17:58
lmayooo
Avatar
Jupstar βœͺ 2023-01-17 18:00:58Z
imo biggest problem isnt even standard lib, but adding new libs sucks cross plattform
18:01
in rust u'd simply use a set crate ez af
18:01
c++, add to cmake etc. annoying
Avatar
Lumpy ◐ω◑ 2023-01-17 18:18:05Z
so is this a developer channel now?
18:18
showroom is saved greenthing (edited)
Avatar
β™‚S1mpleβ™‚ 2023-01-17 21:07:38Z
bro πŸ’€
Avatar
nameless tee
Avatar
Avatar
Jupstar βœͺ
only thing i dislike so far, is that it has no condition variable
These people argued with me for an hour that a condition variable was not necessary to add and was a bad primitive
23:17
I have never in my life wanted to shove my fist through a screen so much
23:23
"You can use this thing that is not a condvar instead but it doesn't sync the unlocking of a mutex so it's not really a replacement at all"
Exported 120 message(s)