Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/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 2021-06-11 00:00:00Z and 2021-06-12 00:00:00Z
Avatar
There are several times people getting voted out of their progress by a group of 4 ~ 6. They can usually join-vote-pass in less than 3 seconds.
💖 1
05:13
Allow team chat to ignore chat delay/chat initial delay if the race has started (so, no others can join and spam the team)
💖 1
Avatar
!image These two headers weren't translated.

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 if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physic...
Avatar
github search keyword highlight is drunk. I thought this was something that needed a fix.
Avatar
chillerdragon BOT 2021-06-11 06:28:00Z
@deen: @Deleted User can I get at least 24h to have a look at the data svg prs? :)
Avatar
Rocket is a web framework for the Rust programming language that makes it simple to write fast web applications without sacrificing flexibility or type safety.
06:58
poggers
Avatar
chillerdragon BOT 2021-06-11 07:10:47Z
yo @TsFreddie any plans on porting your text refactor to ddnet? :)
Avatar
it's too much work justatest
Avatar
chillerdragon BOT 2021-06-11 07:11:25Z
yea i can imagine
07:12
but two different text renders are splitting the code bases even more :/
Avatar
chillerdragon BOT 2021-06-11 07:12:37Z
can it be done step by step? without doing all the work at once?
07:13
is there a way i could support you without knowing what this all textrender stuff is :D
Avatar
maybe. the TextEx can be replaced without touching all other parts.
07:13
i think
Avatar
chillerdragon BOT 2021-06-11 07:13:59Z
you removed textex right?
Avatar
i rewrote a new layout code, it behave differently so i just dropped the textex name with something
07:14
else
07:17
if should be possible to port TextDefered and MakeWord as a replacement for TextEx.
07:17
it should be*
Avatar
chillerdragon BOT 2021-06-11 07:17:22Z
sounds like a start :)
07:17
3d85f00 Fix shellcheck errors and add shellcheck to CI - ChillerDragon a93bbdc Run CI for prs - ChillerDragon ef1aa5e Fix check meta - ChillerDragon 5fd0abc Merge pull request #25 from ChillerDragon/pr_shellcheck - def-
Avatar
but the behavior of text need to be reexamined case by case for every TextEx call
07:18
which is most of the work for vanilla. is just to redo all text.
07:22
we can also nuke all gpu optimization for text in ddnet, get the entire thing over here. then redo the gpu optimization 😅 . but i'm not sure if that's easier.
Avatar
chillerdragon BOT 2021-06-11 07:22:47Z
or we port gpu optimizations to vanilla and then take all back?
Avatar
you can't
07:24
at least you can't do it without extending teeworlds's graphic code.
Avatar
32b8c8c Translate "Name" and "Time" header in ghost menu - TsFreddie ddcf654 Merge #3895 - bors[bot]
Avatar
chillerdragon BOT 2021-06-11 07:26:27Z
yea no omg i do not feel comfortable replacing TextEx
Avatar
ye...
Avatar
Chillerdragon webhook
09:37
feelsgoodman
Avatar
Smart people in here right?
11:03
I've got a few questions if anyone is willing to answer them
Avatar
don't ask to ask, just ask ^^
Avatar
Its not involved with teeworlds thats why @murpi
Avatar
[quakenet] ChillerDragon BOT 2021-06-11 11:39:56Z
#offtopic then
Avatar
Avatar
chillerdragon
@deen: @Deleted User can I get at least 24h to have a look at the data svg prs? :)
You can look at them the whole day xd
Avatar
@heinrich5991 https://paste.pr0.tips/Fe am I doing something wrong?
14:21
How is this compiling so awfully?
14:22
I'm doing like some TRIVIAL string manipulation
Avatar
what are you trying? separating "words" by whitespace?
Avatar
yeah, just return one word
14:23
(I need to do some bookkeeping for further lexing, so I can't just .split_whitespace()
14:23
s/$/)/
Avatar
Split once?
Avatar
@Learath2 no, I don't immediately see why this is slow
Avatar
@Ryozuki need to keep track of indices
14:28
Ah
Avatar
Well it's probably not slow in any amount you'd care about anyway, the assembly looks concerning to me
Avatar
the only thing I notice specifically is that you're splitting on all unicode whitespace
14:29
ah, then this info might be relevant ^
Avatar
On rust all strings are valid unicode
14:30
I think indexing is harder somethimg about glyphs idk
Avatar
utf8*
14:30
no
14:30
it's still indexing by byte offsets
Avatar
indexing by graphemes would be harder, rust just uses fixed size (4 bytes iirc) per char
Avatar
no, &str uses UTF8 as representation
14:32
the indices are byte indices into this byte array
Avatar
@Learath2 do you always look at the assembly output of everything you do?
14:32
Should i do that too?
Avatar
Avatar
Ryozuki
@Learath2 do you always look at the assembly output of everything you do?
Just while i'm learning a language so I can know it's characteristics
Avatar
@Learath2 I'm somehow missing a "get index from slice and element"
Avatar
e.g. what to avoid in critical paths, like virtual calls in languages with bad devirtualization in their compilers
Avatar
but you can probably hack it yourself
Avatar
I would only look at it if i was doing something where i know i can help the compiler vectorize it
14:34
But otherwise never
14:34
pepeH
14:35
@Learath2 some advice i seen, always try to use iterator functions instead of traditional for loops
14:35
Ppl say they optimize better
14:35
In eust
14:35
Rust
14:38
Btw im using rust at work (yes i got a job yay, altho its part time) doing web dev
14:38
greenthing monkalaugh
Avatar
Hm, my unsafe version is about 100 instructions shorter
Avatar
Indexing with unchecked?
Avatar
which unsafe version?
Avatar
Just checking that index is within range and unwrapping unchecked
Avatar
Oh shit, that web is not the best on mobile
Avatar
Yeah awful on phone 😄
14:43
Actually doesn't even need to be unsafe now that I think of it, I can just match the None case and ignore it
14:44
(though it is wasteful, end < len implies it's not None
14:49
Yeah this version is good
Avatar
I think none and some are zero cost or smth
Avatar
Avatar
Ryozuki
Ppl say they optimize better
I wanted to use iterators but Chars contains a reference to the string it's iterating, so I can't keep it in the same struct as the string. (no self referential structs in rust)
14:51
I initially wanted to keep an iterator instead of an index in my struct
14:55
I dont know exactly what u want to do
Avatar
Well as the name says, it's just a lexer 😛
14:55
Like the one we have in CConsole
Avatar
Are you doing it as an exercise to learn ?
14:57
Create ridiculously fast Lexers. Contribute to maciejhirsz/logos development by creating an account on GitHub.
Avatar
Well it's a trivial lexer, I honestly would rather not bring in more dependencies
14:58
The entire thing is a learning exercise anyway, so it's fine
14:58
I'll probably never be okay with linking to a billion external dependencies :/
Avatar
In rust its common
Avatar
In all languages it's common
Avatar
In c++ its a pain
Avatar
I've never been very happy with it, I'm a very big NIH sufferer
Avatar
So i underdtsnd where u come from
Avatar
I like to make things myself
15:06
I just got an even better idea 😛
Avatar
chillerdragon BOT 2021-06-11 15:47:03Z
BTW i vaguely remember some demand for spectating specific switch numbers i quickly cracked that feature together for my client its not crystal clean but it does the job. In case someone is interested in that or wants me to pr against upstream https://github.com/chillerbot/chillerbot-ux/commit/f73296964679e2e9a519b23b3b4eaa7d30900a08
Avatar
Who even thought banning self-referential structs was an acceptable solution?
Avatar
linked lists don't exist in Rust?
Avatar
Not the kind of self referential struct I was talking about but those are also not trivial
19:04
Rust doesn't allow references inside structs to reference other fields of the struct
Avatar
cyclohexatriene 2021-06-11 20:05:06Z
I think it is a very good solution
Avatar
that possible to kill people only when he come from 1 specific side on a tile? if (m_TileIndex == TILE_UP || m_TileFIndex == TILE_UP) { if ((int)GameServer()->Collision()->GetPos(MapIndexT).y > 0) { Die(m_pPlayer->GetCID(), WEAPON_WORLD); } } (edited)
20:09
i mean idk if i can add an option only for 1 side of the y axis (edited)
20:10
idk to explain maybe
Avatar
ok that good i did it
20:21
i just forgot 1 thing
Avatar
@Learath2 it's hard to guarantee safety in presence of these
20:40
you have to guarantee that the other field isn't modified, and in some cases that the whole struct isn't moved
Avatar
@Deleted User you can check where they were last tick
Avatar
Avatar
heinrich5991
@Learath2 it's hard to guarantee safety in presence of these
they should be fine as long as the struct is pinned
Avatar
and the struct fields are frozen
Avatar
frozen? for what? as long as the struct doesn't move around self references can't go stale, no?
Avatar
if you point inside a vector, the vector mustn't reallocate, e.g.
21:52
in rust, a constant reference guarantees that the underlying thing doesn't change¹
Avatar
@Learath2 if you want self-referential structs, you can try https://docs.rs/rental/0.5.6/rental/
A macro to generate safe self-referential structs, plus premade types for common use cases.
22:32
it works if it's behind a pointer (e.g. vec, string)
Avatar
Somewhy when i do GameClient()->SendKill(-1) (Client side) it kills me with 5-10 seconds delay
23:32
I even placed console print in that place
23:32
Right before kill
23:32
And it prints immediately
Exported 137 message(s)