Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2024-10-04 00:00 and 2024-10-05 00:00
Avatar
MilkeeyCat 2024-10-04 06:25
does anyone know where is syscall function defined in source code justatest ? // from /usr/include/unistd.h extern long int syscall (long int __sysno, ...) __THROW; (edited)
Avatar
MilkeeyCat 2024-10-04 06:38
Found it
07:27
11047d1 Break early in peer matching - ChillerDragon a56e532 Merge pull request #9106 from ChillerDragon/pr_break_peer - def-
Avatar
GitHub BOT 2024-10-04 07:45
Yo, the game crashes when you start rendering a demo, press pause and then hit the "x" button to leave the rendering and go back to the demo window. This issue isn't new but it still happens in the 18.2-rc2-win64 version.
Avatar
Koll Potato 2024-10-04 08:19
hi developas
Avatar
Jupstar ✪ 2024-10-04 08:20
hello guy that thinks he is a minion and talks like that
08:20
what's on your heart today
Avatar
MilkeeyCat 2024-10-04 08:21
new day, new segfault when try to run 5 lines program saddo
owo 1
Avatar
Avatar
Jupstar ✪
hello guy that thinks he is a minion and talks like that
Koll Potato 2024-10-04 08:27
hi developa that thinks he is from jupiter
Avatar
Avatar
Jupstar ✪
what's on your heart today
Koll Potato 2024-10-04 08:27
bananas
08:30
wbu?
Avatar
Jupstar ✪ 2024-10-04 08:32
I am thinking about random stuff
owo 1
Avatar
Avatar
Jupstar ✪
I am thinking about random stuff
🎲
Avatar
Avatar
Devinci
Does someone know if the cl_smooth_spectating_time will be on by default? Because for me it was, and I really think it a bad idea. It may be cool for cinematics/videos and stuff, but it just makes the game unplayable in certain situations (spectating t0 while hh/fly for example). I don't think it's a really great idea to make new players get used to it...
i will test this this evening. If it is default it should be turned off. I get that its beautiful, but 0.3s is already 10% of freeze time, i need to move my camera instantly too
f3 1
Avatar
Avatar
Learath2
If the memory locations correspond to the variables I think they do. Yes
MilkeeyCat 2024-10-04 10:48
it wasn't correct after all, in certain cases it flips an expression and instead of 10/5 does 5/10 xd
Avatar
What about adding sending the client language to the server? Is there any problems why this still doesnt exist?
11:11
linux release
Avatar
Avatar
Nicey
What about adding sending the client language to the server? Is there any problems why this still doesnt exist?
why do you need that
Avatar
Avatar
Nicey
What about adding sending the client language to the server? Is there any problems why this still doesnt exist?
hacky workaround: check player's flag
♿ 1
Avatar
hacky workaround: add /language <v>
♿ 1
Avatar
Avatar
zhn
why do you need that
Useful for server localizations
Avatar
There is an issue for it on github. We basically want it the other way around. The server sends just a placeholder and the client displays it in their own language (edited)
Avatar
k, thanks for reply
Avatar
Avatar
Learath2
There is an issue for it on github. We basically want it the other way around. The server sends just a placeholder and the client displays it in their own language (edited)
But why not the client send its language? It would be useful for modifications
Avatar
Avatar
Nicey
Useful for server localizations
you can do it manually + since ddnet doesn't have its own implementation i guess you need to provide one to move further
Avatar
can anyobe give a good sound for ddnet
Avatar
GitHub BOT 2024-10-04 12:12
Server browser's search allows to separate string into few queries, but they work in OR way, would be nice to add AND. Example: I want to find "RUS" AND "Brutal", I don't want to see any other types of servers. (Using exclude is lame) Note: I looked thru code, there is SEARCH_EXCLUDE_TOKEN = ';', maybe it's possible to integrate SEARCH_EXCLUDE_AND_TOKEN = '&', it will probably cause some issues with order calculation. Another way is to add button near 'clear' that will switch logic...
Avatar
Avatar
Learath2
There is an issue for it on github. We basically want it the other way around. The server sends just a placeholder and the client displays it in their own language (edited)
placeholder?
Avatar
Avatar
zhn
you can do it manually + since ddnet doesn't have its own implementation i guess you need to provide one to move further
i can use ASN for automatic language detection, but it would be nice if there was language sent by client (edited)
Avatar
Avatar
Nicey
i can use ASN for automatic language detection, but it would be nice if there was language sent by client (edited)
why not to use good old /language xd
12:17
also you need to support older clients i believe, you will need to handle it anyway
Avatar
Avatar
zhn
why not to use good old /language xd
New players dont know about this command
Avatar
Avatar
zhn
also you need to support older clients i believe, you will need to handle it anyway
I dont think it's a big problem
Avatar
Avatar
Nicey
New players dont know about this command
broadcast it as you do with /register and /login lol
12:19
id less be annoyed with entry broadcast for /language
Avatar
Avatar
zhn
broadcast it as you do with /register and /login lol
still some problems with it
12:20
what i said it's just an idea
Avatar
Avatar
zhn
placeholder?
Something like {{server.join_team%Learath2%60}} which the client would show as Learath2 has joined team 60
Avatar
its good idea, it was discussed even, i thought you need a solution in first place
12:20
my bad
Avatar
Avatar
Learath2
Something like {{server.join_team%Learath2%60}} which the client would show as Learath2 has joined team 60
Jupstar ✪ 2024-10-04 12:20
wtf xd
Avatar
Avatar
Learath2
Something like {{server.join_team%Learath2%60}} which the client would show as Learath2 has joined team 60
ehm, what about mods?
Avatar
Avatar
zhn
its good idea, it was discussed even, i thought you need a solution in first place
brownbear
Avatar
should server provide placeholder list and all the languages supported
Avatar
Avatar
Jupstar ✪
wtf xd
Or whatever other format you like. I'm just thinking out loud
Avatar
Avatar
Learath2
Or whatever other format you like. I'm just thinking out loud
Jupstar ✪ 2024-10-04 12:22
i'd not send it as string at all, but as proper events. But anyway, i think we could send the client language id
12:22
doesn't sound too bad
Avatar
Avatar
zhn
ehm, what about mods?
Don't think it was ever considered. Check out the issue, it's been years, since these were discussed
Avatar
Jupstar ✪ 2024-10-04 12:22
can't satisfy all needs anyway
Avatar
Avatar
Jupstar ✪
i'd not send it as string at all, but as proper events. But anyway, i think we could send the client language id
To be fair, a lot of the events already exist anyway. Those could be moved over whenever, but every single one you change from a server message to event triggered local message requires a version gate
Avatar
breaking protocol changes when justatest
Avatar
About language id, I believe it can be sent without issue. Make a github issue about it so we can see if someone comes up with a problem
Avatar
Avatar
zhn
breaking protocol changes when justatest
Jupstar ✪ 2024-10-04 12:25
Yeah it's defs a mess xd
Avatar
i wonder how 0.7 came up with such structure
Avatar
Avatar
zhn
breaking protocol changes when justatest
I mean never unless we need to?
Avatar
Avatar
Learath2
I mean never unless we need to?
feelsbadman
Avatar
Why would you break the protocol when we have non-breaking extensions to every part of the protocol?
Avatar
Avolicious 2024-10-04 12:27
Just send the client language as language@ddnet.org with a 5 characters like de-de or some standard 😄
Avatar
Avatar
Learath2
Why would you break the protocol when we have non-breaking extensions to every part of the protocol?
because its already a mess
12:27
0.6 protocol is also mess, but it was small atleast
Avatar
I must be misunderstanding what you mean by "protocol"
Avatar
netmsg*
12:28
not the way client connects, responds, its all solid
12:28
i mean the messages themselves
Avatar
What is your issue with them anyway? If you were allowed to break anything, what would you break?
Avatar
map format
Avatar
Avatar
Avolicious
Just send the client language as language@ddnet.org with a 5 characters like de-de or some standard 😄
Avatar
Avolicious 2024-10-04 12:29
I dont want country codes 😄 I want language codes
12:30
Countries can have multiple official languages ( Switzerland for example )
Avatar
Avatar
Learath2
What is your issue with them anyway? If you were allowed to break anything, what would you break?
1. clstartinfo clchangeinfo are self replicating 2. svextraprojectile is redudant(?) 3. input is a system message? why? 4. ready/conready are self replicating 5. mapdata contains the same crc of map, why? 6. and another questions that im not able to recall
12:35
im not familiar with snap system at all but why it has to be system message and why do they divide in snap and snapsingle xd
Avatar
Avatar
zhn
1. clstartinfo clchangeinfo are self replicating 2. svextraprojectile is redudant(?) 3. input is a system message? why? 4. ready/conready are self replicating 5. mapdata contains the same crc of map, why? 6. and another questions that im not able to recall
Most of these are redundancies left from the past. Is it really worth breaking anything for these?
Avatar
Avatar
Learath2
Most of these are redundancies left from the past. Is it really worth breaking anything for these?
these redundancies came from 0.5 to 0.6 and from 0.6 to 0.7
12:44
although theres still a comment in protocol.h // TODO: fix in 0.6 xd
12:45
i didn't check ddnet messages so i can't yap about them right now, i believe it worths to be reviewed at least
Avatar
They don't block any development is my point. If they were being an issue it would be worth breaking protocol, but there is pretty much nothing we can't do because these exist
Avatar
its not only about protocol though, even this language packet thing needs to be version gated, only because ddnet should be back compat in all instances
Avatar
Avatar
zhn
its not only about protocol though, even this language packet thing needs to be version gated, only because ddnet should be back compat in all instances
That part is more up to discussion. I just wanted to say the protocol isn't really limiting development
Avatar
Avatar
zhn
its not only about protocol though, even this language packet thing needs to be version gated, only because ddnet should be back compat in all instances
Jupstar ✪ 2024-10-04 13:38
how is your 0.5 port going? lol
13:41
@always r u a coder btw? I probably seen you before, but cannot really connect your rn
Avatar
https://www.ietf.org/rfc/rfc3066.txt is already used in the code to detect the initial language
Avatar
Avatar
Jupstar ✪
@always r u a coder btw? I probably seen you before, but cannot really connect your rn
not a contributor of ddnet
13:46
if thats what ur askin
13:46
and no to the second one
13:46
im new to ddnet
Avatar
Avatar
always
not a contributor of ddnet
Jupstar ✪ 2024-10-04 13:48
I dunno, but maybe what programming languages you like and stuff like that xd
Avatar
i know a bit of python js and c++
13:49
havent really made anything cool tho
Avatar
GitHub BOT 2024-10-04 13:52

THIS IS VERY UNOPTIMIZED BUT IM LACKING SKILLS TO DO SO, PLS HELP

Currently if you have multiple search items (separated by ';'), and server has multiple of them, only first will be highlighted, this PR fixes it. Before: !image After: !image

Checklist

  • [x] Tested the change ingame
  • [x] Provided scre...
Avatar
Avatar
GitHub
Click to see attachment 🖼️
graphical pros' help needed @Jupstar ✪ @Robyt3 🥹
Avatar
Avatar
Anime.pdf
graphical pros' help needed @Jupstar ✪ @Robyt3 🥹
Jupstar ✪ 2024-10-04 13:54
with what exactly?
13:54
how many fps u have now compared to previously
Avatar
перфаратор фортнайт 2024-10-04 13:54
is_bundled(SSP_BUNDLED "${SSP_LIBRARY}") if(NOT SSP_BUNDLED) message(FATAL_ERROR "could not find ssp paths")
Avatar
how do I metric fps in meny
Avatar
Jupstar ✪ 2024-10-04 13:54
I am honestly someone that doesn't care about GUI performance (in menu) too much, if it's not a disaster xd (edited)
Avatar
перфаратор фортнайт 2024-10-04 13:54
whaе?
Avatar
Avatar
Anime.pdf
how do I metric fps in meny
Jupstar ✪ 2024-10-04 13:54
ctrl shift d
Avatar
Avatar
Jupstar ✪
ctrl shift d
dropped from 400 to 70
Avatar
Jupstar ✪ 2024-10-04 13:55
oh uff xd
Avatar
Jupstar ✪ 2024-10-04 13:55
in release mode?
Avatar
oh right, forgot about optimizations, 1 min
14:01
ok now its around 320
14:02
difference is about 30-40 fps in the end
Avatar
Jupstar ✪ 2024-10-04 14:03
sounds ok
14:04
but maybe finds something during his review or smth
Avatar
well, it finds all search items in str, stores them in 2 vectors, filters and merges those vectors' items and renders them. all of this in 1 'render frame', this even sounds not very good
14:07
but it's the best way I found to do what I wanted
Avatar
Good afternoon, I would like to know how I can register on the official ddnet forum, I submitted an application several times, but it was not accepted for a long time
Avatar
We’re pleased to announce that the litigation against Sable has finally concluded on terms that we believe send a strong message to patent trolls everywhere — if you bring meritless patent claims against Cloudflare, we will fight back and we will win.
Avatar
Avatar
Anime.pdf
well, it finds all search items in str, stores them in 2 vectors, filters and merges those vectors' items and renders them. all of this in 1 'render frame', this even sounds not very good
Jupstar ✪ 2024-10-04 14:11
There is probably a better solution, but as you see the CPU is so fast that it only drops 40 fps. It's hard to really guess if your algorithm is bad without properly benchmarking what bottlenecks your new code.
Avatar
Avatar
Jupstar ✪
There is probably a better solution, but as you see the CPU is so fast that it only drops 40 fps. It's hard to really guess if your algorithm is bad without properly benchmarking what bottlenecks your new code.
fair enough
14:16
Avatar
patents truly suck
Avatar
Avatar
Ryozuki
patents truly suck
Jupstar ✪ 2024-10-04 14:18
go ahead, i am always open for some patent bashing
Avatar
@Jupstar ✪
14:27
In the end, Sable agreed to pay Cloudflare $225,000, grant Cloudflare a royalty-free license to its entire patent portfolio, and to dedicate its patents to the public, ensuring that Sable can never again assert them against another company.
Avatar
Jupstar ✪ 2024-10-04 14:30
they move around money as if it's nothing xd
Avatar
They picked the wrong company to annoy. You need to go against mid to large sized ones. Not a 27B$ megacorp
14:53
cool vid to know rly basics of ecc
Avatar
fkt
15:03
вам всем хана
15:03
я вас заминировал
Avatar
Jupstar ✪ 2024-10-04 15:03
english pls
Avatar
Avatar
Jupstar ✪
english pls
he mined us
16:05
mined like mine like bomb
Avatar
Jupstar ✪ 2024-10-04 16:09
thanks for banging me
Avatar
Avatar
knopick.
я вас заминировал

RU

Уходи, плохой человек.

EN

Go away, bad man.
Avatar
Avatar
Jupstar ✪
how is your 0.5 port going? lol
no one plays it anyway, im making it for my own entertainment
Avatar
Avatar
knopick.
я вас заминировал
$deepl
Avatar
Avatar
knopick.
я вас заминировал
Hi! Most of us communicate in English. If you’re having trouble with English, use https://www.deepl.com/en/translator to help you out.
Avatar
Avatar
Learath2
That part is more up to discussion. I just wanted to say the protocol isn't really limiting development
it limits development of mods, not ddnet :P
Avatar
Avatar
zhn
it limits development of mods, not ddnet :P
It's not the protocol that prevents it, it's that you don't control the client much. That's a far more fundamental issue of the teeworlds network architecture in general
16:54
Most of the weird workarounds in the code are from a time when we didn't have the most used client either
16:56
(e.g. nothing about the protocol is stopping mods from just sending their own visual-fx@mymod.zhn.org and nothing about the protocol is stopping us from adding whatever-weird-feature@netmsg.ddnet.org)
Avatar
Avatar
DDNet
Hi! Most of us communicate in English. If you’re having trouble with English, use https://www.deepl.com/en/translator to help you out.
Maybe this message should be printed in multiple languages xd
Avatar
Avatar
deen
Click to see attachment 🖼️
xDDD
Avatar
Avatar
Teero
Maybe this message should be printed in multiple languages xd
ask murpi
Avatar
Avatar
Teero
Maybe this message should be printed in multiple languages xd
@murpi ^
Avatar
probs in russian/french
17:11
cuz those 2 are the ones who know less english
17:11
from my xp
17:11
maybe spanish too justatest
Avatar
we argued about it already, proposed english/turkish/russian text
Avatar
i guess we dont have many baguettes here
Avatar
would be cool to have something like $deepl language
17:12
like you write $deepl russian and it shows text in russian
Avatar
ㄊgazzwer 2024-10-04 17:13
I was banned for 1 day, you can unban
Avatar
Avatar
zhn
would be cool to have something like $deepl language
every single bot command would need to be translated then i guess?
Avatar
@Jupstar ✪ the RAM inventor died today
tear 1
17:13
sadge
Avatar
Avatar
ㄊgazzwer
I was banned for 1 day, you can unban
#✉-create-a-ticket -> #ban-appeal
Avatar
Avatar
meloƞ
every single bot command would need to be translated then i guess?
no why, $deepl is the only language specific command imo
17:14
otherwise you need to know english anyway
Avatar
In semiconductor electronics, Dennard scaling, also known as MOSFET scaling, is a scaling law which states roughly that, as transistors get smaller, their power density stays constant, so that the power use stays in proportion with area; both voltage and current scale (downward) with length. The law, originally formulated for MOSFETs, is based o...
Avatar
Jupstar ✪ 2024-10-04 17:19
good bot
Avatar
Avatar
Jupstar ✪
good bot
heartw
Avatar
I'm looking for the latest source code of man command, the version in my Linux is pretty old(v1.6f), but I failed after googling a while. I mean the latest source code of man, not man-pages but the
17:25
We've noticed that some of our automatic tests fail when they run at 00:30 but work fine the rest of the day. They fail with the message gimme gimme gimme in stderr, which wasn't expected. Why are...
17:26
"Gimme gimme gimme a man after midnight"
Avatar
this is how you learn english
17:31
no need for translation justatest
17:50
this is how much denuvo costs
Avatar
just imagine to have this and 1 person who breaks every denuvo patched game
Avatar
@Learath2 what do you think of this sparkle particle effect? https://github.com/ddnet/ddnet/pull/9047#issuecomment-2394212268
This PR adds invincible mode as an alternative to super that is safe for /practice mode. Specifically, it does not allow the player to interact with members of other teams. Please read the individu...
Avatar
Avatar
timakro
@Learath2 what do you think of this sparkle particle effect? https://github.com/ddnet/ddnet/pull/9047#issuecomment-2394212268
I like it, looks nice
Avatar
MilkeeyCat 2024-10-04 18:12
Cool effect xd
Avatar
Avatar
MilkeeyCat
Cool effect xd
Great effect
Avatar
Jupstar ✪ 2024-10-04 18:14
missingno in ddnet
18:14
my missingno is cool too
Avatar
is the video broken for you? works fine for me
Avatar
Jupstar ✪ 2024-10-04 18:18
if i dont pause and move the video cursor around it works for me too
Avatar
lol
Avatar
MilkeeyCat 2024-10-04 18:23
It works for me if i watch from start but if i select time it breaks
Avatar
lol it does break if you select time
Avatar
MilkeeyCat 2024-10-04 18:24
It's a new ui feature
Avatar
Jupstar ✪ 2024-10-04 18:27
google can't handle their own format
18:28
in ff it works
Avatar
In mathematics, the Birch and Swinnerton-Dyer conjecture (often called the Birch–Swinnerton-Dyer conjecture) describes the set of rational solutions to equations defining an elliptic curve. It is an open problem in the field of number theory and is widely recognized as one of the most challenging mathematical problems. It is named after mathema...
19:27
why im reading things i cant understand
Avatar
@timakro what about spawning particles on the tee and have them go radially outward
Avatar
@louis i tried it. looked bad in my opinion
Avatar
GitHub BOT 2024-10-04 19:31
When the datafile is closed, only the CDataFileReader::Open and CDataFileReader::Close functions may be called. All other functions will now assert instead of returning some default-values if no file is open. The CDataFileReader::Open function will now assert if the file is already open instead of implicitly closing the previous one.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related c...
Avatar
Avatar
Ryozuki
why im reading things i cant understand
An effect of alcohol
Avatar
Avatar
Learath2
An effect of alcohol
do u think most ppl who drink read complex math articles
Avatar
No, it's reserved to nerds. You start to overestimate your capability of understanding
Avatar
its funny cuz earlier i was learning about eliptic curves
19:36
and this article is about a complex problem on these
19:36
destiny
Avatar
I only know that it's one of those conjectures with the prize money
Avatar
GitHub BOT 2024-10-04 19:39
There were missing from practice mode.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck...
Avatar
Avatar
Learath2
I only know that it's one of those conjectures with the prize money
yep
Avatar
rust help needed
19:43
i have not ?Sized trait that should expose mutable parts of itself
19:45
things i tried to use for interior mutability: 1. Cell, doesn't fit since i need to use it immutably too 2. RefCell, doesn't fit since i want to return reference to field of borrowed refcell
Avatar
show examples
19:46
why u have ?sized in first place
19:47
what does not ?sized
19:47
since ?sized means either sized or unsized
19:47
what does "not ?sized" mean
19:47
pepeW
19:47
i if u are delving into the arts of dynamic dispatch
Avatar
I'm guessing it's an unsized type, but then what is there to mutate? 😵💫
Avatar
learn the concept of object safety in rust
Avatar
Avatar
Ryozuki
why u have ?sized in first place
i don't have it
Avatar
i construct dyn trait object that im boxing and want to use
Avatar
so whats ur problem
Avatar
since trait doesn't depend on ?Sized i can't use &mut Whatever as return type
19:49
ah wait
19:49
wtf
Avatar
can u show me a example method pls
Avatar
nah wait seems i got jerked by myself
Avatar
are u making a builder pattern?
19:50
i dont see why u couldnt be able to return a &mut dyn X
Avatar
no, but for whatever reason i got "trait is not object safe" everytime
Avatar
hehe
19:51
the thing i told u
Avatar
its gone now so i can't even tell you anything
Avatar
Jupstar ✪ 2024-10-04 19:52
did you remove Self: Sized? ^^
19:52
i didn't have it
Avatar
Jupstar ✪ 2024-10-04 19:52
So it magically works, nice
Avatar
sussy baka
Avatar
rustc tried to force me to make it Sized, thats why i asked "not ?sized" in first place
Avatar
Jupstar ✪ 2024-10-04 19:53
where exactly did it force you to have it Sized tho?
Avatar
wait im getting the same
Avatar
Jupstar ✪ 2024-10-04 19:54
show the func signature
Avatar
since i want to exposee &mut S, where S is field of original struct that should implement trait
19:54
and i can't do it
19:54
thats why i came to using cells
19:54
and got stuck on playing with refs
Avatar
Jupstar ✪ 2024-10-04 19:55
show where u use &mut S
19:55
just leak
Avatar
if u need to use cells u probs doing something bad
19:56
wh yu want to expose &mut S
Avatar
Jupstar ✪ 2024-10-04 19:56
code tells more than 1000 images
19:56
😬
19:56
brb gettign another drink
Avatar
late for u?
Avatar
its 20
19:57
but i wont go sleep too late
19:57
22*
19:57
gotta wake up at 7 justatest
19:58
to travel to the french
19:58
driving
Avatar
struct Abuse { noby: EpicClonableBigObject } impl Noby for Abuse { fn noby(& [need mut to expose itself] self) -> &mut EpicClonableBigObject { &mut self.noby } } trait Noby { fn noby(& [no mut since it should be object safe] self) -> &mut EpicClonableBigObject; }
Avatar
do u know a nice trick
19:58
u can impl a trait for a mutable reference directly
19:59
impl Noby for &mut Abuse { fn noby(self) -> &mut EpicClonableBigObject { &mut self.noby } }
19:59
well idk if its correct
Avatar
Avatar
zhn
struct Abuse { noby: EpicClonableBigObject } impl Noby for Abuse { fn noby(& [need mut to expose itself] self) -> &mut EpicClonableBigObject { &mut self.noby } } trait Noby { fn noby(& [no mut since it should be object safe] self) -> &mut EpicClonableBigObject; }
Jupstar ✪ 2024-10-04 19:59
fn noby() -> &mut S where Self: Sized
Avatar
im not in best state kek
Avatar
Avatar
Jupstar ✪
fn noby() -> &mut S where Self: Sized
true
Avatar
Avatar
Jupstar ✪
fn noby() -> &mut S where Self: Sized
well, are boxed values sized?
Avatar
a box is sized yes
19:59
it has ptr size
Avatar
hm, i need to smoke rust docs more
20:00
thank you guys
Avatar
a dyn object is not sized
20:00
cuz u cant know it
20:00
Box<dyn T> has size of Box, which is ptr sized (edited)
20:01
well a dyn T is in reality 2 ptrs
20:01
kek
20:01
but i recommend u avoid returning mutable references to struct fields
20:01
u should seek to structure ur program in another way
20:01
to avoid this
Avatar
BRC | Yota. 2024-10-04 20:01
ah
Avatar
dont think like C
Avatar
BRC | Yota. 2024-10-04 20:01
am i supposed to be here
Avatar
for example u can make functions that accept a &mut T where T is the field type
Avatar
BRC | Yota. 2024-10-04 20:02
also why my hooks r too heavy
20:02
xd
Avatar
and pass the field to it
20:02
as &mut x.y
Avatar
Avatar
zhn
struct Abuse { noby: EpicClonableBigObject } impl Noby for Abuse { fn noby(& [need mut to expose itself] self) -> &mut EpicClonableBigObject { &mut self.noby } } trait Noby { fn noby(& [no mut since it should be object safe] self) -> &mut EpicClonableBigObject; }
Jupstar ✪ 2024-10-04 20:02
but tbh i have to admit i dont fully understand why it's not working
Avatar
Avatar
BRC | Yota.
also why my hooks r too heavy
no cuz u dont knwo rust
20:02
go to #general
Avatar
Avatar
Ryozuki
no cuz u dont knwo rust
BRC | Yota. 2024-10-04 20:02
watcha saying
20:02
how i dont know rust
20:02
what is rust
20:02
xd
Avatar
Avatar
Jupstar ✪
but tbh i have to admit i dont fully understand why it's not working
i guess u cant reutrn a reference to a possibly unsized thing
Avatar
Avatar
Jupstar ✪
but tbh i have to admit i dont fully understand why it's not working
it works if you don't want this trait to object safe and not-Sized
20:03
to be*
20:03
yeah seems Sized isn't that strict, i will use it
Avatar
Avatar
Ryozuki
i guess u cant reutrn a reference to a possibly unsized thing
Jupstar ✪ 2024-10-04 20:03
yeah but his example looked like the type is known
20:03
maybe that confused me dunno
Avatar
Avatar
Ryozuki
i guess u cant reutrn a reference to a possibly unsized thing
Jupstar ✪ 2024-10-04 20:03
ah u mean self
20:03
yeah maybe
Avatar
// epnicclonableobject = Vec<usize> struct Abuse { noby: Vec<usize> } impl Noby for Abuse { fn noby(&mut self) -> &mut Vec<usize> { &mut self.noby } } trait Noby { fn noby(&mut self) -> &mut Vec<usize>; }
20:04
idk
20:04
this compiles
20:04
for me
Avatar
Jupstar ✪ 2024-10-04 20:04
tja
Avatar
Jupstar ✪ 2024-10-04 20:04
if it wouldnt be shortly before bed time, i'd maybe think about it
Avatar
Avatar
Jupstar ✪
if it wouldnt be shortly before bed time, i'd maybe think about it
bro tomorrow is saturday
20:05
party time
20:05
rust party
Avatar
Jupstar ✪ 2024-10-04 20:05
Nice
Avatar
ok i feel dumb, it works now
Avatar
Avatar
zhn
yeah seems Sized isn't that strict, i will use it
sized just requries that when u impl it i guess u cant return dyn (but u can box it) (edited)
20:06
can u show what u did
Avatar
Avatar
Ryozuki
// epnicclonableobject = Vec<usize> struct Abuse { noby: Vec<usize> } impl Noby for Abuse { fn noby(&mut self) -> &mut Vec<usize> { &mut self.noby } } trait Noby { fn noby(&mut self) -> &mut Vec<usize>; }
this
Avatar
lmayo
Avatar
don't question me, i don't know what happened
20:06
xd
20:07
jupjap how did you manage to pass rust std to wasm modules?
20:07
or you didn't
Avatar
Avatar
zhn
jupjap how did you manage to pass rust std to wasm modules?
Jupstar ✪ 2024-10-04 20:07
there are std functions that panic, like creating a thread
20:07
since that is sandboxed
20:08
I dont pass any std functions to the runtime
Avatar
core + alloc
Avatar
but std structs?
Avatar
Jupstar ✪ 2024-10-04 20:08
alloc is probably handled by the wasm runtime
Avatar
Avatar
zhn
but std structs?
Jupstar ✪ 2024-10-04 20:08
struct objects are serialized
20:08
and then deserialized in wasm
Avatar
so i don't need any workaround if i simply use anything from std (even net?) inside of code that will compile into wasm?
Avatar
Avatar
zhn
so i don't need any workaround if i simply use anything from std (even net?) inside of code that will compile into wasm?
Jupstar ✪ 2024-10-04 20:09
network is sandboxed ofc
20:09
just imagine that you can use anything that isnt kernel
Avatar
sorry, i didn't manage to find any relatable info not from 2019-2020
Avatar
add no_str
20:10
no_std
Avatar
Jupstar ✪ 2024-10-04 20:11
you can use lot of std stuff tho, since allocations work
20:11
memory allocations
20:12
async works too, but only single threaded and with a different runtime than tokio. So i abstracted that away to be easy to use in wasm modules
20:12
for the rendering module u can even read files from file system, but physics can't
20:14
The only really unsafe thing you can do is communicate with a database, if one is enabled in the config. Sadly I don't see any real chance to sandbox this in a sane way. Guess the best is to create a database user with as few permissions as possible
20:14
i also dunno what kind of hacks mysql allows. i know some database engines allow you to write files etc. quite powerful xd
Avatar
im talking about wasm in general tho
Avatar
Jupstar ✪ 2024-10-04 20:17
@zhn to say it differently. by default everything is sandboxed, but you can add e.g. WASI to your runtime and it would allow all std stuff, even net & fs. WASI then tries to make it as safe as possible
Avatar
Avatar
zhn
im talking about wasm in general tho
Jupstar ✪ 2024-10-04 20:18
yeah the idea for wasm in internet browsers is that you can compile anything to wasm and it just works
20:19
e.g. browsers have no udp. that is a problem that wasm can't solve
Avatar
Avatar
Jupstar ✪
@zhn to say it differently. by default everything is sandboxed, but you can add e.g. WASI to your runtime and it would allow all std stuff, even net & fs. WASI then tries to make it as safe as possible
yeah wasi is the only way to go with ig, but arent specifications for wasi-io, wasi-whatever are still at phases 1-3?
Avatar
Avatar
zhn
yeah wasi is the only way to go with ig, but arent specifications for wasi-io, wasi-whatever are still at phases 1-3?
Jupstar ✪ 2024-10-04 20:19
i guess they are still preview yeah
20:20
but so or so, it depends on the wasm host
20:20
Do you plan to use WASM for anything or what?
Avatar
rust-rust
20:20
both as host and guest
Avatar
Jupstar ✪ 2024-10-04 20:21
and what would be your use case? xdd
Avatar
exactly same as yours, but only for server-side and teeworlds compatible
Avatar
Jupstar ✪ 2024-10-04 20:21
ah
20:22
yeah that is cool indeed
Avatar
actually it would be cool to know how wasm works at all, i had many projects that needed modules/addons
Avatar
Jupstar ✪ 2024-10-04 20:22
well i can tell you that there are rust runtimes that expose WASI already
Avatar
all of them died because i tried to stick with unstable rust abi, implementing c api, doing lua, etc
Avatar
Jupstar ✪ 2024-10-04 20:22
it's just not API stable
Avatar
wasmer
Avatar
Avatar
zhn
all of them died because i tried to stick with unstable rust abi, implementing c api, doing lua, etc
Jupstar ✪ 2024-10-04 20:23
have you seen my wasm video i posted in the hub
Avatar
phub?
20:23
justatest
20:23
poggers2
Avatar
Jupstar ✪ 2024-10-04 20:23
xd
Avatar
Avatar
Jupstar ✪
have you seen my wasm video i posted in the hub
when did u post it kekw
Avatar
Avatar
Ryozuki
wasmer
i found also wasmtime, is there any difference?
Avatar
Avatar
zhn
when did u post it kekw
Jupstar ✪ 2024-10-04 20:27
https://youtu.be/qIioHMY-bYQ?t=1059 here i quickly show how i did it. basically to sum it up:
  • i have a interface that is to be implemented
  • on host side i call the trait function of the wasm manager which also implements the interface, and it automatically, with a macro, serializes all parameters and results
  • on guest i implement it automatically deserializes with the macro and calls the objects trait function
Avatar
Avatar
zhn
i found also wasmtime, is there any difference?
i dont remember and im nto sobre enough rn
20:29
i know one of these crates has a compiler
20:29
cranelift
20:29
awesome
Avatar
seems its wasmer
Avatar
Avatar
Jupstar ✪
https://youtu.be/qIioHMY-bYQ?t=1059 here i quickly show how i did it. basically to sum it up:
  • i have a interface that is to be implemented
  • on host side i call the trait function of the wasm manager which also implements the interface, and it automatically, with a macro, serializes all parameters and results
  • on guest i implement it automatically deserializes with the macro and calls the objects trait function
uh, seems they finally blocked youtube
Avatar
Jupstar ✪ 2024-10-04 20:29
i use wasmer as runtime yeah
20:29
but cranelift is from byte code aliance
Avatar
i need to boot up my vless in finland
Avatar
Jupstar ✪ 2024-10-04 20:30
they also have a rust runtime
20:30
but apparently it's slower
20:30
and ig i'm too lazy to rewrite the code to check if it's really slower xd
Avatar
Avatar
zhn
uh, seems they finally blocked youtube
Jupstar ✪ 2024-10-04 20:30
oh wow, does russia block it, or does youtube have to block it xd
Avatar
russia blocks youtube
Avatar
Jupstar ✪ 2024-10-04 20:31
tja sucks
Avatar
rumors say they will block discord too
Avatar
Jupstar ✪ 2024-10-04 20:31
i welcome you in europe 😏
Avatar
gg my pc died trying to index all 864 crates from ddpg dependencies
Avatar
Jupstar ✪ 2024-10-04 20:35
only 864? how outdated is your stand 😬
20:36
XD
20:36
ok ig not all have to be indexed
20:36
true
Avatar
rust analyzer goes wild
Avatar
Avatar
zhn
russia blocks youtube
that sux
Avatar
Jupstar ✪ 2024-10-04 20:37
you mean it's not normal that rust analyzer uses 4GB on idle?
20:37
min sys requirements for ddnet: toaster min sys requirements for compiling ddnet: NASA pc
20:39
ah i forgot to install firefox unload tabs extension
20:39
this goddamn thing ate up to 11 gbs
Avatar
Jupstar ✪ 2024-10-04 20:39
do you use no swapfile?
20:40
without swap i'd crash like once per day lmao
20:40
32GB ram are not enough nowadays anymore xD
Avatar
Avatar
Jupstar ✪
do you use no swapfile?
i do, its 8gb
20:42
rust analyzer was going directly in swap
Avatar
Jupstar ✪ 2024-10-04 20:42
😬
20:42
buy 4 TB HDD and make it your swap
20:42
then you can safely open 2 firefox tabs
20:42
without crashing
20:43
man since learath is go enjoyer he makes no RAM jokes anymore
20:44
nah firefox is pretty good with sidebery on
20:45
ublock+sidebery+agent switcher+being eu citizen=best browsing experience
20:45
they can't block youtube in us xd
Avatar
Avatar
Jupstar ✪
man since learath is go enjoyer he makes no RAM jokes anymore
I don't write go code to run on my own computer, I don't care how much cloud web5.0 ram my employer pays for
Avatar
10 Go (micro) services ~ 1 Java "micro" service.
Avatar
Avatar
Jupstar ✪
only 864? how outdated is your stand 😬
why do you force push it 😭
Avatar
Avatar
zhn
why do you force push it 😭
Jupstar ✪ 2024-10-04 20:59
tja
21:00
gotta wait few months
21:00
then i stop doing that
Avatar
Avatar
zhn
why do you force push it 😭
Jupstar ✪ 2024-10-04 21:02
But anyway zhn, to motivate you. Once you solved the sharing memory problem it's gonna be an epyc experience
21:03
it magically works, and performs quite good, but watch your RAM footprint xd
21:03
I am sadly not at a point yet where I really tested how much RAM overhead that vm has, and how i can minimize it
Avatar
Avatar
Jupstar ✪
then i stop doing that
you can just commit it and squash before epic release
21:25
justatest
Avatar
Avatar
zhn
you can just commit it and squash before epic release
Jupstar ✪ 2024-10-04 21:25
on i can't. bcs privately i use a real commit history
troll 1
Avatar
Avatar
zhn
you can just commit it and squash before epic release
Jupstar ✪ 2024-10-04 21:27
my life in the last 2 years was basically git commit with msg u
troll 1
21:27
xddddddd
21:32
@zhn where is ur repo
Avatar
Avatar
Jupstar ✪
@zhn where is ur repo
which one
Avatar
Jupstar ✪ 2024-10-04 21:33
for your new project using wasm
Avatar
its not published
21:33
im still polishing the code
21:34
also still no 0.7 and ddnet support
21:34
i want to add these
Avatar
Jupstar ✪ 2024-10-04 21:36
so 0.5 only or what? lol
Avatar
no, 0.5 and pure 0.6
Avatar
Jupstar ✪ 2024-10-04 21:36
ah nice
21:37
can't believe you do the reverse chillerdragon
21:37
0.5 was my childhood, it feels too nostalgic to drop it as is
21:38
and libtw2 is too good to not use it xd
Avatar
Jupstar ✪ 2024-10-04 21:38
my childhood was ddpg
Avatar
Avatar
zhn
and libtw2 is too good to not use it xd
Jupstar ✪ 2024-10-04 21:38
nice, maybe it finally gets the use it awaited for so long
21:39
that repo exists since i know ddnet code xd
Avatar
i did remove all the Warn though, mercy me oh lord5991
Avatar
Avatar
zhn
i did remove all the Warn though, mercy me oh lord5991
Jupstar ✪ 2024-10-04 21:41
what is that?
Avatar
some kind of tracing of warnings from the lib code to user
21:43
so functions will not panic, but pass you warn object if something goes wrong, but not that bad to panic
Avatar
GitHub BOT 2024-10-04 22:25
a3e19fc Make CCharacter::SetSuper() idempotent - timakro f51664e Add rcon command "invincible" which does nothing yet - timakro b564110 Make invincible players immune to freeze, death and teleport tiles and give them unlimited jumps - timakro c91be7b Add practice command /invincible to toggle invincible mode - timakro 5457e8f Render sparkling trail for invincible players - timakro d51a726 Merge pull request #9047 from timakro/pr-add-invincible-mode - def-
Avatar
why did we do this instead of removing team interaction from super?
Avatar
cuz the implementor can call it a new feature
22:32
x)
22:32
i actually dont know
22:32
im happy that timakro is contributing again tho
Avatar
idk I guess they just didn't think it would be allowed to remove the team interaction so added a new mode instead
Avatar
so if it doesnt interact with other teams, why does it need a particile effect?
Avatar
i mean super might definitely still be wanted on test ddr servers
Avatar
looks nice tho but idk if its neccessary
Avatar
the way it behaves as is
22:34
so it doesn't make all that much sense to change it w/o adding an option (edited)
Avatar
is there a legitimate use case for having super affect all teams?
22:35
I thought it was just trolling
Avatar
fuckin around
22:35
yea
22:35
it's necessary
Avatar
how do u rly control that substate within super tho
22:35
easier to just add new mode
Avatar
this mode is pretty annoying to maintain
22:36
super itself is annoying to maintain
22:36
this kinda doubles it
Avatar
change is super calls to is invincible calls which will also return true for super
Avatar
that's not what they did
22:36
that sucks
22:36
i didnt look at the code
22:37
ahh it all makes sense now
Avatar
you could add that to super
Avatar
perhaps
22:38
i like the sparkling tee a lot
22:39
maybe it should be more opaque & less geometric tho
22:39
or uh
22:39
just have fewer particles tbh
Avatar
super mario 64 star effect
Avatar
GitHub BOT 2024-10-04 22:42
The particle effects should be kept. Having 2 modes that do the same thing except one has a feature that isn't useful doesn't seem worth it. It's quite a pain to have so many individual checks in the physics code for both of them.
Avatar
I left a comment on GH but we could also have another mode that only does the cross team thing
22:52
which would even let you play cross team without the other super effects
Avatar
where did you comment
22:55
a3b2146 Add assertions to CDataFileReader checking if file open/closed - Robyt3 e63d738 Remove unused datafile reader variable in dummy_map tool - Robyt3 fa28581 Merge pull request #9110 from Robyt3/Datafile-Reader-Assertions - def-
Avatar
Avatar
Tater
is there a legitimate use case for having super affect all teams?
ask testers lol
Avatar
I think actually it's better to just keep that functionality in a separate mode, which would still be less maintenance than super+ invincible
22:58
I'll work on it later today
Avatar
so u mean super + cross team (non mutually-exclusive w/ super)? (edited)
22:59
no invincible?
Avatar
Avatar
Tater
you could add that to super
Make a shader!
Avatar
i think that is kind of a tough sell. this pr could be refactored to work like that, plus he did all the cosmetics
23:00
or a pr can be made to refactor
23:00
merged 34 min ago
Avatar
GitHub BOT 2024-10-04 23:35
38d297f Add practice commands /totele(cp), /(un)livefreeze, /(un)endless - timakro dd82b1e Merge pull request #9111 from timakro/pr-add-missing-practice-commands - def-
Exported 508 message(s)
Timezone: UTC+0