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-07-21 00:00 and 2024-07-22 00:00
Avatar
chillerdragon BOT 2024-07-21 00:31
We need benchmarks in the CI hehe
Avatar
Avatar
chillerdragon
@heinrich5991: i got a bunch of git conflicts in https://github.com/ddnet/ddnet/pull/5949 again when did you say will you have a look? Or are you not planning to merge it anymore and just roll your own translation layer? If so I would like to be informed.
heinrich5991 2024-07-21 00:48
chillerdragon: I'm currently working on a translation layer that would allow the 0.7 compatibility (and all the other backward compatibility code) to live in a single place. I haven't looked at pull requests recently
🥳 1
Avatar
Avatar
chillerdragon
We need benchmarks in the CI hehe
heinrich5991 2024-07-21 00:50
chillerdragon: be the change you want to see in the world
Avatar
ws-client BOT 2024-07-21 01:02
<ChillerDragon> be the change hasnt been working out so well for me
01:02
<ChillerDragon> since my change is not merged :p
01:03
<ChillerDragon> @heinrich5991 so what does that mean for the 0.7 client pr?
01:03
<ChillerDragon> also the CI is slow enough I don't think its a good idea was more a joke thus the "hehe"
Avatar
heinrich5991 2024-07-21 01:04
I think adding benchmarks has a quicker turn around time adding 0.7 support
01:04
doesn't need to always run in the CI. benchmarks for stuff like this just sounds like a net benefit
Avatar
ws-client BOT 2024-07-21 01:04
<ChillerDragon> Oh like something that can be triggered manually ye that would be cool
01:05
<ChillerDragon> Yea im not doing it.
01:05
<ChillerDragon> 0.7 first
01:05
<ChillerDragon> So what about the pr now? Are you keeping it on hold until its replaced by your translation layer?
01:06
<ChillerDragon> Do you even need to have a look? You had 2 years time to have a look and robsti approved it.
Avatar
heinrich5991 2024-07-21 01:07
I'm not taking a look at it currently, nor am I taking a look at most of the other PRs currently
Avatar
ws-client BOT 2024-07-21 01:07
<ChillerDragon> Do you need to take a look for it to be merged?
Avatar
heinrich5991 2024-07-21 01:08
if someone else merges it, then it'll be merged. I don't know if someone else will merge it
Avatar
ws-client BOT 2024-07-21 01:08
<ChillerDragon> @deen your time to shine. The merge machine!
01:08
<ChillerDragon> click da green btn pls uwu https://github.com/ddnet/ddnet/pull/5949
While keeping 0.6 fully working and untouched this adds the option to connect via 0.7. The server browser now lists also 0.7 servers. The 0.7 skin system is only active for 0.7 connections and the ...
Avatar
what is the status on #8283 ?
Avatar
Example rcon command: broadcast "aaaaaaa^123bbbbbbbbbbbb^321cccccccccccccccccc" ^123 and ^321 are the color codes that will not be included in the displayed text See #4897 Checklist T...
Avatar
ws-client BOT 2024-07-21 03:03
<ChillerDragon> @louis the status is waiting for heinrich. He does not like the color codes 0.7 does but did not say yet which format would be acceptable.
Avatar
ChillerDragon: do u know any good resources or repos to look at for getting started with vanilla-ish mods on ddnet codebase?
Avatar
Avatar
chillerdragon
Ah nice idea. Yea that sounds good.
stencil moment
Avatar
ws-client BOT 2024-07-21 05:33
<ChillerDragon> @louis you want damage and vanilla weapons? Then start with this source as a base https://github.com/JSaurusRex/ddnet/tree/vanilla
DDraceNetwork, a cooperative racing mod of Teeworlds - GitHub - JSaurusRex/ddnet at vanilla
Avatar
ddnet 3DS
gigachad 2
Avatar
Avatar
Headshot
ddnet 3DS
console porting specialist be like
Avatar
Hello! I have already graduated from university, got married and had 2 wonderful children. Maybe there is news about the android version now?
troll 3
Avatar
Jupstar ✪ 2024-07-21 08:02
wow and you still can't afford a computer? poor guy
lol 5
Avatar
KEKW good morning btw
Avatar
Avatar
fokkonaut
@Robyt3 did something in newer ddnet version change regarding snap items or something? My ddnet gets quite high cpu & gpu when a lot of items are there
If it's happening consistently then you can use git bisect to identify the responsible commit
Avatar
GitHub BOT 2024-07-21 08:47

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](https://github.com/ddnet/ddnet/#using-ad...
Avatar
You could first write a small benchmark of the code you think is slower now, then run that with git bisect
Avatar
GitHub BOT 2024-07-21 08:53

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](https://github.com/ddnet/ddnet/#using-ad...
Avatar
ws-client BOT 2024-07-21 09:36
<ChillerDragon> @Hekkeyne ye robsti is working on it. So there is news! But nothing finished yet as far as i know. May I ask what you need the android version for? Playing on a computer should be smoother.
Avatar
Avatar
Jupstar ✪
wow and you still can't afford a computer? poor guy
no, of course there is
Avatar
Avatar
ws-client
<ChillerDragon> @Hekkeyne ye robsti is working on it. So there is news! But nothing finished yet as far as i know. May I ask what you need the android version for? Playing on a computer should be smoother.
I don’t know, my question has already become a habit
Avatar
ws-client BOT 2024-07-21 09:38
<ChillerDragon> So you don't even need the android version? xd
😔 1
Avatar
Avatar
meloƞ
KEKW good morning btw
gm
Avatar
Avatar
ws-client
<ChillerDragon> So you don't even need the android version? xd
why, the android version would be a great thing for traveling (or for the toilet)
Avatar
i really do want to play block on my phone while taking a dumpy
Avatar
ws-client BOT 2024-07-21 09:40
<ChillerDragon> Yea maybe for some.
09:40
<ChillerDragon> I personally don't even play on my laptop. If I don't have a good setup I just don't play at all.
09:41
<ChillerDragon> But yea different people have different taste. So you do play on the computer and would not mind to also play on the phone? That should be a huge skill decrease.
Avatar
Jupstar ✪ 2024-07-21 09:41
What chillerdragon wants to say is: 0.7 has more players than there are mobile players. He feels superior
Avatar
ws-client BOT 2024-07-21 09:41
<ChillerDragon> Does the current version of ddnet android run on your phone did you ever play it? @Hekkeyne
Avatar
Avatar
ws-client
<ChillerDragon> Does the current version of ddnet android run on your phone did you ever play it? @Hekkeyne
which? 0.9.x?
Avatar
ws-client BOT 2024-07-21 09:42
<ChillerDragon> yes
09:42
<ChillerDragon> @Jupstar ✪ I have 0.6 on my iPad lmao
Avatar
Avatar
ws-client
<ChillerDragon> yes
Nope
Avatar
Jupstar ✪ 2024-07-21 09:42
how did u do that
Avatar
ws-client BOT 2024-07-21 09:42
<ChillerDragon> used to be in the appstore
Avatar
huuuh?
09:42
when :o
Avatar
Jupstar ✪ 2024-07-21 09:42
didnt know someone compiled to ios
Avatar
ws-client BOT 2024-07-21 09:42
<ChillerDragon> A few years ago
09:43
<ChillerDragon> Ye some madlad did a pretty solid ios port ran smooth on my phone and ipad and that dude even paid to get it into the official stores
09:43
<ChillerDragon> vanilla teeworlds not ddnet
Avatar
so it was just removed because of ios's tos?
Avatar
ws-client BOT 2024-07-21 09:43
<ChillerDragon> How would that be tos?
Avatar
Jupstar ✪ 2024-07-21 09:44
it aint making money for apple
Avatar
ws-client BOT 2024-07-21 09:44
<ChillerDragon> I assume the author did not care enough to keep it in the store forever
Avatar
Jupstar ✪ 2024-07-21 09:44
thats against the tos xdd
Avatar
ws-client BOT 2024-07-21 09:44
<ChillerDragon> is it tos to make money?
09:44
<ChillerDragon> rly? xd
Avatar
Jupstar ✪ 2024-07-21 09:44
i dunno
09:44
from apple i'd expect that
Avatar
ws-client BOT 2024-07-21 09:44
<ChillerDragon> its making apple money
09:44
<ChillerDragon> you gotta pay to have the app published
Avatar
oh yeah there was this developer license thingy right
09:44
for 100$ kek (edited)
Avatar
Jupstar ✪ 2024-07-21 09:44
100 bucks are not enough for apple xd
09:45
you are destroying other paid apps with it
09:45
😬
Avatar
XCode also requires a license iirc?
Avatar
ws-client BOT 2024-07-21 09:45
<ChillerDragon> i assume who ever it was did not want to spend 100 a year forever
09:46
<ChillerDragon> @Hekkeyne so you are asking for ddnet mobile so long that it became a habit and you also got 2 kids during that time of asking. And you never bothered to try the android version thats already there? xd
09:46
<ChillerDragon> trol
Avatar
Jupstar ✪ 2024-07-21 09:47
there are many ppl here asking all the time.. i bet it's all the alter egos of a single person
😔 1
Avatar
Avatar
ws-client
<ChillerDragon> @Hekkeyne so you are asking for ddnet mobile so long that it became a habit and you also got 2 kids during that time of asking. And you never bothered to try the android version thats already there? xd
I wrote that 0.9.x does not work (android 14)
Avatar
ws-client BOT 2024-07-21 09:48
<ChillerDragon> @meloƞ downloading xcode is free and requires no account. Unlike vs :P so apple is smoother than microsoft in that regard. vs forced me to signup to compile at some point xd
Avatar
huuuuuh really? XD
Avatar
ws-client BOT 2024-07-21 09:48
<ChillerDragon> ah i see @Hekkeyne i must have overseen that
Avatar
Avatar
ws-client
<ChillerDragon> ah i see @Hekkeyne i must have overseen that
it's okay
Avatar
Jupstar ✪ 2024-07-21 10:47
@Robyt3 do you have a branch on your gh for the touch controls or are they still too unfinished to be worth it?
Avatar
Avatar
Jupstar ✪
@Robyt3 do you have a branch on your gh for the touch controls or are they still too unfinished to be worth it?
I still need to finish them up a bit, but they should be ready for a first draft PR tomorrow.
Avatar
Jupstar ✪ 2024-07-21 10:50
ah great to hear
Avatar
chillerdragon BOT 2024-07-21 10:52
Jopsti mobile enjoyer
Avatar
GitHub BOT 2024-07-21 11:02
Only copy the server info with the GetServerInfo function once, as it should not change within a call of the CGameClient::OnNewSnapshot function.

Checklist

  • [X] 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
  • [ ] Change...
Avatar
Avatar
Robyt3
If it's happening consistently then you can use git bisect to identify the responsible commit
Not very consistently, idk, will try
Avatar
GitHub BOT 2024-07-21 11:17
If I'm not mistaken, then GPUs were unconditionally added to the GPU list. In practice that might not be the biggest deal since vk 1.1 seems like the standard, but safe is safer.

Checklist

  • [x] 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 bou...
Avatar
GitHub BOT 2024-07-21 11:38
74426b0 Avoid copies of server info in CGameClient::OnNewSnapshot - Robyt3 cd3a97c Merge pull request #8627 from Robyt3/Client-GetServerInfo-Cleanup - heinrich5991
Avatar
GitHub BOT 2024-07-21 11:48
Closes #8622

Checklist

  • [X] 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](https://github.com/ddnet...
Avatar
GitHub BOT 2024-07-21 12:23
ec37efd refactor: use text containers to render movement information - MilkeeyCat 606212f Merge pull request #8629 from MilkeeyCat/pr_refactor_text_alignment_of_movement_information - Robyt3
Avatar
GitHub BOT 2024-07-21 12:36
Given the big amount of tabs and sections the DDNet settings menu has, what about a way to search them? might be easier for new players or players who just forget where things are. I was thinking a simple search bar somewhere that returns a list of related settings. Clicking on one of those settings sends the user to that setting tab with the requested setting dimly highlighted.
Avatar
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
ah gg it linked the issue
12:57
kek
Avatar
GitHub BOT 2024-07-21 12:59
f9067c3 Update translation stats - def-
Avatar
chillerdragon BOT 2024-07-21 13:07
pro ddnet githubber
Avatar
bors[bot]
Avatar
GitHub BOT 2024-07-21 13:13
e962759 Check API version before adding GPU to GPU list - Jupeyy d8cee35 Merge pull request #8628 from Jupeyy/pr_gpu_if - def-
Avatar
i think bors[bot] is cheating someone needs to ban him from the github leaderboard
Avatar
you are just jealous
Avatar
chillerdragon BOT 2024-07-21 13:27
bors is actually my dummy. I would like to merge stats pls, thank
🔨 1
Avatar
GitHub BOT 2024-07-21 13:34
e20f434 Update simplified_chinese.txt - By622 4df9b8c Merge pull request #8625 from By622/patch-15 - def-
13:37
b24a377 Update traditional_chinese.txt - By622 d0492e6 Update data/languages/traditional_chinese.txt - def- 3297aa3 Merge pull request #8626 from By622/patch-18 - def-
Avatar
according to #town-hall dummies have rights and you should ask bors first
Avatar
ws-client BOT 2024-07-21 14:07
<bors> Hello I am ChillerDragon's dummy
Avatar
Bors Matyas 2024-07-21 14:10
?
Avatar
ws-client BOT 2024-07-21 14:23
<ChillerDragon> xxxxxxxxD
Avatar
he is conscious 😮
Avatar
Im currently building like this (justatest): 1. rm -Force build 2. mkdir build 3. cd build 4. cmake .. 5. cmake --build . -j 6. cd debug 7. mv .\steam_api.dll .\DDNet.exe .. I think there is a lot of "unnecessary" stuff happening. someone told me a better way to build, although I forgot. Can someone maybe point out a better way to build? (edited)
17:07
Was it not having to delete /build ?
Avatar
for moderators command /forceswap , that immediately swaps him with blocker and after he bans that person and saves tees that were blocked . would be helpful if that blocker is somewhere in middle or almost in finish of the map .
f3 1
Avatar
Jupstar ✪ 2024-07-21 17:15
i dont think moderators should be able to cheat
Avatar
Avatar
APFFF
Im currently building like this (justatest): 1. rm -Force build 2. mkdir build 3. cd build 4. cmake .. 5. cmake --build . -j 6. cd debug 7. mv .\steam_api.dll .\DDNet.exe .. I think there is a lot of "unnecessary" stuff happening. someone told me a better way to build, although I forgot. Can someone maybe point out a better way to build? (edited)
dont use msvc :P - if you type them one by one, consider adding a simple .ps script maybe
Avatar
Im not sure how cmake --build . -j works exactly. Does it overwrite changes making the rm unnecessary?
Avatar
Avatar
APFFF
Im not sure how cmake --build . -j works exactly. Does it overwrite changes making the rm unnecessary?
heinrich5991 2024-07-21 17:21
cmake --build should only recompile necessary changes. rm shouldn't be necessary
👍🏼 1
Avatar
you could also just add a --clean-first if you want a.. well.. clean rebuild
👍🏼 1
Avatar
what does clean mean
Avatar
heinrich5991 2024-07-21 17:24
removing everything
👍🏼 1
Avatar
cmake --clean-first --build . -j or cmake --clean-first, cmake --build . -j (edited)
Avatar
heinrich5991 2024-07-21 17:26
don't clean
17:26
that just makes the build take longer
17:26
it re-does work that was already done
f3 1
Avatar
yes, but just for curiosity (edited)
Avatar
use clean-first if your cmakecache changed and it requires you to, otherwise just use cmake .. and cmake --build . -j
👍🏼 1
Avatar
heinrich5991 2024-07-21 17:27
-j shouldn't be necessary either btw
Avatar
really?
Avatar
heinrich5991 2024-07-21 17:27
do you use ninja for building?
Avatar
always thought it fallsback to 1
Avatar
heinrich5991 2024-07-21 17:27
ninja does the correct thing
17:28
(if you use make: switch to ninja. it's faster)
Avatar
is that an alternative to msvc?
Avatar
no. (cmake .. -GNinja)
Avatar
heinrich5991 2024-07-21 17:29
ah. msvc is something different, sorry
17:29
I don't know about msvc and -j. maybe it's necessary there
Avatar
tbh, I have very little knowledge about the whole building process, especially with c++
Avatar
i usually recommend using an IDE of choice with builtin cmake support, it really helps not having to care about it all that much
17:31
its mostly a "click here to run x" button in most modern IDE'S :P
Avatar
I do care, just not very knowledgeable yet
owo 1
Avatar
Avatar
APFFF
I do care, just not very knowledgeable yet
maybe https://discord.com/channels/252358080522747904/293493549758939136/1232683170969681931 can answer some of your questions? - i had a similar issue with msvc and chatted with ewan and roby about it
Avatar
Avatar
Jupstar ✪
i dont think moderators should be able to cheat
only for banning blockers and helping blocked tees to be safe
Avatar
Avatar
texnonik
only for banning blockers and helping blocked tees to be safe
mods shouldn't be able to interfere with that, this seems prone to be abused
Avatar
I love coding, though its not all I do. So I'm very welcome for any knowledge by people who are more knowledgeable
Avatar
Avatar
meloƞ
mods shouldn't be able to interfere with that, this seems prone to be abused
If a mod abuses it then he shouldn't be a mod. Could be used to clean the mod team a bit ^^
Avatar
It would be the first mod feature which could potentially give yourself an advantage instead of only "punishing" others
Avatar
Avatar
Devinci
If a mod abuses it then he shouldn't be a mod. Could be used to clean the mod team a bit ^^
Jupstar ✪ 2024-07-21 17:56
but as soon as it is abused (e.g. to steal a r1) it cannot be undone
17:56
the rank can only be deleted
Avatar
I'm not a huge fan of giving any rcon user including admins any ability to modify gameplay directly at all. There is a reason even the admins can't enable test commands in a release build after server start. (I know we technically can but it's the principle rather than the practical)
✅ 1
Avatar
Avatar
ws-client2
<ChillerDragon> @heinrich5991 saying "there should be X" is step one. It doesnt have to be a technically complex thing. But if two people build the same thing like gerdoe and fokko it could also just be one doing it and sharing it with the other.
ping me next time !
Avatar
Idea: Adding spectate_free_view and spectate_recent to the Spectate-Mode spectate_free_view: changes to Free View spectate_recent: Spectates the most recently spectated player (edited)
Avatar
Avatar
APFFF
Idea: Adding spectate_free_view and spectate_recent to the Spectate-Mode spectate_free_view: changes to Free View spectate_recent: Spectates the most recently spectated player (edited)
You can spectate -1 for Free View
Avatar
tbf, thats all the code does justatest I didnt know until i looked in the code tho. maybe adding it to the command description would help some (edited)
Avatar
yeah, would be useful to explain this in the description
Avatar
wb spectate_recent. When I spectate someone else, I often want to check out parts of the map in free view, then switch back to spectating that particular player
Avatar
Not sure it's worth the added complexity, seems alright without saving and restoring Multi View
Avatar
ChillerDragon: review ddnet-insta pr pls cat
Avatar
Avatar
Anime.pdf
ChillerDragon: review ddnet-insta pr pls cat
wrong mod to code for
19:12
angy
Avatar
Avatar
meloƞ
wrong mod to code for
this change was essential
19:13
Sticker
Avatar
(edited)
19:15
advertising?
19:15
Avatar
oh yeah whattafak is dix
Avatar
@ninekeem @Sedonya
Avatar
they also had some server with just 6 bots that were displayed in player list
Avatar
seems somebody attacks them kekw
Avatar
Avatar
Souly
they also had some server with just 6 bots that were displayed in player list
ye that's because its nudelsaft's js lib based bots
19:26
they're testing them for fng or something
Avatar
those bots were just telling the time lmao
Avatar
ye currently
19:27
also you can curl some data from them xd
Avatar
MilkeeyCat 2024-07-21 20:00
#[derive(Debug, Clone, PartialEq)] pub struct ExprStruct { name: String, fields: BTreeMap<String, Expr>, } impl IntoIterator for ExprStruct { type Item = (String, Expr); type IntoIter = <BTreeMap<String, Expr> as IntoIterator>::IntoIter; fn into_iter(self) -> Self::IntoIter { self.fields.into_iter() } } is this a cursed way to implement .into_iter() or is it ok?
Avatar
what about the name struct - isn't it unused? (edited)
Avatar
MilkeeyCat 2024-07-21 20:09
i will use it before into_iter, so it should be fine(maybe)
Avatar
Lgtm, seems a little unflexibel tho (edited)
20:10
But If its Just for that one thing, i wouldnt Change it
Avatar
Avatar
meloƞ
Lgtm, seems a little unflexibel tho (edited)
MilkeeyCat 2024-07-21 20:12
my development methodology is called "do first, think later"
Avatar
gigachad as all things should be
Avatar
MilkeeyCat 2024-07-21 20:13
i was thinking i wont use unwrap but here we are
Avatar
unwrap_or_else() is goated change my mind
Avatar
MilkeeyCat 2024-07-21 20:14
unwrap's shorter change my mind
Avatar
Avatar
fokkonaut
@ninekeem @Sedonya
Yes, we are being attacked by bots, I don't know who is doing it. But since I'm not at home, only ninekeem can help, and he already knows about the attack
👍 3
Avatar
Avatar
Sedonya
Yes, we are being attacked by bots, I don't know who is doing it. But since I'm not at home, only ninekeem can help, and he already knows about the attack
One of the players took a screenshot
20:28
"adogit" appears to be a bot creator, his nickname is similar to the others, but 99.9% it's not his main nickname
Avatar
nice emojis btw
owo 2
Avatar
Avatar
MilkeeyCat
#[derive(Debug, Clone, PartialEq)] pub struct ExprStruct { name: String, fields: BTreeMap<String, Expr>, } impl IntoIterator for ExprStruct { type Item = (String, Expr); type IntoIter = <BTreeMap<String, Expr> as IntoIterator>::IntoIter; fn into_iter(self) -> Self::IntoIter { self.fields.into_iter() } } is this a cursed way to implement .into_iter() or is it ok?
heinrich5991 2024-07-21 20:31
what's cursed about it?
Avatar
Avatar
heinrich5991
what's cursed about it?
MilkeeyCat 2024-07-21 20:33
i dont really understand <BTreeMap<String, Expr> as IntoIterator>::IntoIter part, maybe it's bad ¯\_(ツ)_/¯
Avatar
heinrich5991 2024-07-21 20:33
no, that's fine
Avatar
Avatar
fokkonaut
Click to see attachment 🖼️
Turkey bots ddosed us. I already ban them. I hope…
🛹 1
Avatar
Avatar
MilkeeyCat
i dont really understand <BTreeMap<String, Expr> as IntoIterator>::IntoIter part, maybe it's bad ¯\_(ツ)_/¯
heinrich5991 2024-07-21 20:34
you could also use btree_map::IntoIter<String, Expr>
Avatar
Avatar
ninekeem
Turkey bots ddosed us. I already ban them. I hope…
why are they doing this
Avatar
Avatar
fokkonaut
why are they doing this
I don't know. I already met this about half year ago, but bots were on all TeeSports servers.
Avatar
weird people
Avatar
Avatar
heinrich5991
you could also use btree_map::IntoIter<String, Expr>
MilkeeyCat 2024-07-21 20:34
that actually looks much nicer 😄
Avatar
Avatar
MilkeeyCat
#[derive(Debug, Clone, PartialEq)] pub struct ExprStruct { name: String, fields: BTreeMap<String, Expr>, } impl IntoIterator for ExprStruct { type Item = (String, Expr); type IntoIter = <BTreeMap<String, Expr> as IntoIterator>::IntoIter; fn into_iter(self) -> Self::IntoIter { self.fields.into_iter() } } is this a cursed way to implement .into_iter() or is it ok?
Jupstar ✪ 2024-07-21 20:35
why dont u make fields public
Avatar
Avatar
Jupstar ✪
why dont u make fields public
MilkeeyCat 2024-07-21 20:38
half of my structs have public fields but sometimes something snaps in my head and im like "public - bad" and use private fields xd
Avatar
Jupstar ✪ 2024-07-21 20:39
sure public can be bad.. but getters and setters (and intoiter here is kinda a getter) can be annoying and bad too i guess
20:39
depends on your goal i guess, if u fear someone modifies fields without any reason then yeah
Avatar
MilkeeyCat 2024-07-21 20:40
it's my code so noone will change it =]
Avatar
Avatar
MilkeeyCat
Dear diary, I can't find words to describe the pain and humiliation I experienced during debugging my code, it was generating correct output 50% of the time. I couldn't understand why but after starting at it like an idiot I realized I was interating over a map and because of it the order was wrong sometimes
MilkeeyCat 2024-07-21 20:40
@Jupstar ✪ did you see this? xd (edited)
Avatar
Avatar
MilkeeyCat
@Jupstar ✪ did you see this? xd (edited)
Jupstar ✪ 2024-07-21 20:42
ah yeah that sucks 😄
20:42
did u use a hashmap or what
Avatar
MilkeeyCat 2024-07-21 20:42
yup gigachad
Avatar
Jupstar ✪ 2024-07-21 20:42
linked hash map best
20:42
keeps order
20:42
keeps O(1) in avg case
20:42
haters gonna hate
20:42
😬
Avatar
MilkeeyCat 2024-07-21 20:43
performance for nerds, my goal is to make code run justatest
Avatar
heinrich5991 2024-07-21 20:43
python has a that data structure by default
Avatar
Jupstar ✪ 2024-07-21 20:43
yeah
20:43
insert is kinda slow tho, must be said 😄
20:43
at least the crate i was using.. and slow ofc doesnt mean 10 times slower
20:43
but slower than the std hashmap
Avatar
heinrich5991 2024-07-21 20:44
the std hashmap is already said to be slow
Avatar
Jupstar ✪ 2024-07-21 20:44
true
20:44
indexmap is next best
20:44
but only keeps order in certain cases
20:44
delete will swap
Avatar
heinrich5991 2024-07-21 20:44
fxhashmap is a faster hashmap than the default AFAIK
Avatar
Jupstar ✪ 2024-07-21 20:48
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
20:49
ignore #access for vec, i need a very special case... access by index is ofc almost instant
20:49
and ofc these benchmarks are rather simple and dont reflect a real world example
20:50
what i especially like is that iterating is so fast
Avatar
heinrich5991 2024-07-21 20:50
Type alias for a hash map that uses the Fx hashing algorithm.
Avatar
Jupstar ✪ 2024-07-21 20:51
ok
Avatar
Jupstar ✪ 2024-07-21 20:58
quite impressive but suffers similar stuff like hashmaps https://pastebin.com/7f2GCU2U
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
20:58
but for normal hashmaps good replacement
20:59
clone and clone_from are insane
20:59
almost on pair with vec
20:59
at least for few elements
Avatar
heinrich5991 2024-07-21 21:51
cool. ty ❤️
21:51
the rust compiler uses it internally
Exported 252 message(s)
Timezone: UTC+0