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 2023-08-28 00:00:00Z and 2023-08-29 00:00:00Z
Avatar
That was so confusing to read
Avatar
what was?
Avatar
yea right
Avatar
i want to wait more efficiently
02:15
while(pUserData->GetJobStatus() != CFileLoadJob::FILE_LOAD_JOB_STATUS_RUNNING) {} this works smoothly but i think the cpu usage is not ideal (edited)
02:15
metrics are worse when i yield though while(pUserData->GetJobStatus() != CFileLoadJob::FILE_LOAD_JOB_STATUS_RUNNING) { std::this_thread::yield(); } (edited)
Avatar
Avatar
Ewan
hmmmm
this is w/o yield
02:16
this is with
02:16
i could try and turn the status variable into a condition variable ig
02:16
and wait on that
02:16
maybe the stl knows better
Avatar
it's using like 30% of my cpu peak when yielding lol
02:50
10 on upstream
02:51
hmm
Avatar
and still dealing with this shit on mingw
03:34
cool backtrace bro
03:39
surely you are joking
Avatar
does graphics get destructed before components do?
Avatar
Avatar
Ewan
does graphics get destructed before components do?
No, otherwise the components can't unload properly
Avatar
that's what i thought
05:25
but i'm getting a bogus ptr from Graphics() i think during CSkins dtor
05:26
i could try OnShutdown
Avatar
True, destructors are probably more unpredictable. What I said should apply to OnShutdown
Avatar
DDNet.exe has finished with exit code 0.
05:30
😌
Avatar
Avatar
Robyt3
No, otherwise the components can't unload properly
looking at the call stack anyway i think it would get deleted first or during the same step (making things unpredictable) because IGraphics is an IInterface, as is IEngine which holds client which holds the components. and the kernel just goes through the interfaces and deletes
05:38
well actually, it does seem to have an order to it // delete interfaces in reverse order just the way it would happen to objects on the stack wonder why it crashes then. o_O
05:38
doesn't matter. onshutdown works
Avatar
what's up with the REQUIRES macro
Avatar
so it’s just letting clang thread safety analysis know that it needs something of the type PROVIDED
07:35
seems cool
Avatar
yes, it's good to have compiler check as much as possible statically
Avatar
(rust)
Avatar
I need to get the coordinates of my tee from the code (I mean the client, not the server), who knows how to do this? (edited)
Avatar
you are trying to make a bot
09:54
@Jupstar ✪
  • new account
  • client related code
  • asking how to do x
09:55
the ticks pass
09:55
justatest
Avatar
im back to work, so more active here
Avatar
Epic
Avatar
Then I can ask more rust questions again
09:57
E.g. why does the clone derive macro not automatically implement clone for generics that are behind a Rc
09:58
ah
09:58
well Rc doesnt require the inner type to be clone
09:58
btw
09:58
u usually use Rc with copy types
09:58
Rc refcell otherwise
Avatar
yes, that's why it's weird
09:59
ok its Cell for copy
Avatar
Avatar
Jupstar ✪
yes, that's why it's weird
Rc itself is clonable
09:59
why u want inner to be clone?
09:59
Rc makes a inner non clonable clonable
09:59
u can derive clone on a struct with a Rc
Avatar
consider this code: #[derive(Clone)] pub struct Smth<B> { a: Rc<RefCell<B>>, } #[derive(Clone)] pub struct Smth2<B> { a: Smth<B>, } Clone would not be implemented
Avatar
Put your entire code in an unsafe block, use only *mut T as intended by god
Avatar
because B does not implement Clone
10:00
ah
10:01
i think Rc doesnt implement the trait
10:01
u use Rc::clone
10:01
?
10:01
i forgot
10:01
maybe implement clone urself
10:01
and call rc clone associated method
Avatar
Avatar
Jupstar ✪
consider this code: #[derive(Clone)] pub struct Smth<B> { a: Rc<RefCell<B>>, } #[derive(Clone)] pub struct Smth2<B> { a: Smth<B>, } Clone would not be implemented
derive macro isn't intelligent. it always requires all type parameters to be Clone even if that's not necessary
Avatar
yes i did that
10:01
but ugly extra code xd
Avatar
Avatar
heinrich5991
derive macro isn't intelligent. it always requires all type parameters to be Clone even if that's not necessary
ok xd
Avatar
add #[inline]
10:01
u can add inline in trait methods i think btw
10:01
when u impl
10:02
look at std code
10:02
its everywhere
Avatar
idc about perf, it's just about extra code 😄
Avatar
u do care about perf
Avatar
if i care about perf, i use LTO
10:02
so no use for inline for me
Avatar
i'd say yes
10:03
i dunno if llvm's lto is as good as gccs, but in theory i dont care xd
Avatar
Code generation inline — Hint to inline code. cold — Hint that a function is unlikely to be called. no_builtins — Disables use of certain built-in functions. target_feature — Configure platform-specific code generation. track_caller - Pass the parent call location to std:panic:Location::caller(). instruction_set - Specify the instruction set used to generate a functions code
😃 1
Avatar
Avatar
Jupstar ✪
i dunno if llvm's lto is as good as gccs, but in theory i dont care xd
Where is the real jupstar?
10:03
panic turned into a emote
Avatar
Avatar
Learath2
Where is the real jupstar?
i can hint you: i compile with LTO
Avatar
rip :panic:
Avatar
Avatar
Ryozuki
panic turned into a emote
into a pokemon
Avatar
does lto ignore inlines and does whathever?
Avatar
lto will inline if it's worth it
Avatar
@Jupstar ✪ did u benchmark with mimalloc
10:04
oh
10:04
u use wasm nvm
Avatar
LTO might not know if it’s worth it
Avatar
btw there are wasm oriented allocators
10:05
that perfom better
Avatar
Avatar
Learath2
LTO might not know if it’s worth it
that's true
10:05
but humans might not now either
Avatar
The Wasm-Enabled, Elfin Allocator. Contribute to rustwasm/wee_alloc development by creating an account on GitHub.
Avatar
i generally prefer to let compiler decide
Avatar
oh nvm
Avatar
now compes the WASM optimizations
Avatar
its outdated
Avatar
Yep, we must thus compile every possible combination of inline and noinline functions so we can bench
Avatar
comes*
Avatar
Avatar
Learath2
Yep, we must thus compile every possible combination of inline and noinline functions so we can bench
yep also note: whenever i talk about perf i mean the actual real effective perf I rarely do micro optimizations.. That's usually waste of time
Avatar
they do add up tho
Avatar
If smth runs better with 16 cores... i give it 16 cores
Avatar
browsers do lots of micro opts
10:07
i think
10:07
btw soon llvm 17 releases
Avatar
You must be an impostor, the Jupstar I know would do micro optimizations for 1 extra fps 😛
Avatar
theorically they improved compile times
10:07
and code gen
10:07
so faster ddnet
Avatar
Avatar
Ryozuki
so faster ddnet
Celebrate
Avatar
Avatar
Learath2
You must be an impostor, the Jupstar I know would do micro optimizations for 1 extra fps 😛
the jupstar i know would find the code path that wastes 100 fps xd
Avatar
I need to get the coordinates of my tee from the code (I mean the client, not the server), who knows how to do this?
Avatar
Is it https://github.com/mautrix/discord/issues/117, or more/other kinds of messages? which client do you use?
Replying to chillerdragon Zwelf: the new bridge mostly shows (null) as text in the reply’s. That…
10:33
The issue on Element-Android is rated as "S-Tolerable - Low/no impact on users" 😞 https://github.com/vector-im/element-android/issues/8460
Steps to reproduce I am using a mautrix-discord bridge. If anybody replies to my message it shows up as a white space in Element Android. However, it renders fine in Element Desktop. If you long pr...
Avatar
b4e0e49 Update serbian.txt - JuraIBOZO 669f384 Update data/languages/serbian.txt - Robyt3 e19b1e4 extract code from editor mapitems into separate files - Marmare314 07c3302 Merge pull request #7081 from JuraIBOZO/patch-1 - def- c7f3be7 Merge pull request #7082 from Marmare314/editor-seperate-mapitems - def-
Avatar
isnt fortran that one impossible language or
Avatar
chillerdragon BOT 2023-08-28 11:42:52Z
I saw it on my ios element
Avatar
330d1eb Add possibility to persist game data past map changes - heinrich5991 cbdb3b1 Record previous game ID in teehistorian - heinrich5991 a48d14f teehistorian: Omit "prev_game_uuid" instead of setting it to null - heinrich5991 baffa8d Merge pull request #7080 from heinrich5991/pr_ddnet_teehistorian_prev_game_uuid - def-
12:28
good video imho
Avatar
destroyer of worlds... kiinda kinda terraria reference. just kinda
Avatar
terraria didnt exist back then
12:31
maybe its in reverse
Avatar
hmm, serverlist is empty currently, and #bot-cmds doesn't respond
Avatar
terraria is referencing this
12:31
lol ye
12:31
http://ddstats.org/ doesnt load for me
Avatar
ddnet.org is down too
Avatar
i guess cuz it cant reach master
12:32
@heinrich5991 @deen master server is down alert
Avatar
i can still connect to server using direct ip: ger2.ddnet.org:8xxx
12:32
maybe its cloudflare?
12:32
12:32
idk
12:33
12:33
xd my web wasnt prepared for a down master
Avatar
But https://wiki.ddnet.org is reachable (also on cloudflare)
12:34
i bet its ddnet vps running out of storage
12:34
if they use hetzner it shouldnt be an issue cuz i also use hetzner
Avatar
(i mean an issue with the hoster)
Avatar
so cloudflare is working
Avatar
this gave me the idea to make a status page
12:34
status.ddstats.org soon
Avatar
@DDNet is offline
Avatar
#announcements
12:37
ah, master is back i think
Avatar
Why does DDNet take forever to close now '-'
Avatar
what are all ddnet masters?
12:49
if masters work behind cloudflare i can offer to host 1 in my server
Avatar
there is no multi-master support, so the Chinese master clones the master master
Avatar
Avatar
murpi
Why does DDNet take forever to close now '-'
We have an issue/discussion for that I think, we should cancel all open https requests when exiting client
Avatar
Replying to chillerdragon I saw it on my ios element
Avatar
Avatar
deen
there is no multi-master support, so the Chinese master clones the master master
U can load balance with cloudflare but doubt it is free
13:00
So if anyone wants to contribute
13:00
Maybe that's the way
Avatar
Avatar
Ryozuki
@heinrich5991 @deen master server is down alert
I even got a notification, but was asleep 😮
Avatar
Never sleep giga_chad
justatest 1
13:01
this is the way
Avatar
Avatar
Ryozuki
if masters work behind cloudflare i can offer to host 1 in my server
need this ^
Avatar
That's what is currently on right ?
13:03
Ah I saw the discussion
Avatar
what do you mean, "currently on"?
Avatar
I didn't see the discussion with the chinese master
Avatar
the chinese master is currently just a mirror of master1
Avatar
View DDNet / Teeworlds Statistics.
13:17
rudimentary xd
Avatar
it'd be interesting to see which URL you're requesting
13:29
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
13:30
this tool can be used to check whether masterserver registering works
13:30
it's what powers my alerts
Avatar
added urls
Avatar

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/ddnet/#using-ad...
14:34
5e923ad fix map drag and drop - dobrykafe 8957ae9 remove whitespace - dobrykafe cb29ad2 dont switch to editor if loading fails - dobrykafe 758601c remove duplicate code - dobrykafe ff1a2a4 Merge pull request #7076 from dobrykafe/pr-fix-map-drag-and-drop - def-
Avatar
My current day job is now again a C++ role. And so, I find myself again focusing in this blog post on the downsides of C++. Overall, I have found returning to active C++ dev to be exactly what I expected: I still have the skills, and can still be effective in it, but now that I have worked in a more modern programming language with less legacy c...
Avatar
6705ccc Fix all envelopes being saved as bezier - HiRavie 8122314 Merge pull request #7093 from HiRavie/master - heinrich5991
15:22
Use any async Rust library from PHP! Contribute to danog/php-tokio development by creating an account on GitHub.
Avatar
Avatar
GitHub
Click to see attachment 🖼️
Astral|Crying🌙 2023-08-28 15:23:26Z
bozo
Avatar
Avatar
murpi
Why does DDNet take forever to close now '-'
I looked into this last night while I was dev’ing, I though it was a me issue but masters were up & my client wasn’t loading. Said it was a cert load failure. I think the server browser job doesn’t end in this case
Avatar
Avatar
Ryozuki
@deen
someone do an iceberg for ddnet
Avatar
Made me aware that I need to add app close behavior to my thing tho
15:30
😃
Avatar
Avatar
heinrich5991
someone do an iceberg for ddnet
true would be nice
Avatar
I pushed more to my doohickey. It’s good but I wonder if I can increase performance by waiting smarter on the variable on the other thread instead of busy waiting
Avatar
Avatar
Ryozuki
@deen
I'm at depth 5 for the last couple years
15:45
Need to go deeper
Avatar
Avatar
heinrich5991
Click to see attachment 🖼️
Stuck at level 2 on this one 😄
Avatar
I think I did level 4 once 😅
Avatar
do we start at 0 or 1
Avatar
I meant 4 = taboo ctf tactics
15:49
I like the "nmapping /0 to find challs early" 😄
Avatar
Avatar
Jupstar ✪
do we start at 0 or 1
I started at 1
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
you had me until c++0x concepts
15:52
this was written as propaganda i can tell
Avatar
this is not a hall of shame. the intent is to awaken you to many of the peculiarities and weirdness of computers. hopefully, after reading these articles, you will have learned a lot and will embrace chaos.
Avatar
@Ryozuki do you also have it that u have to run cargo clean very often after doing git pull, because rust-analyser is too stupid xd do you know a workaround other then rebuilding? normal building does not help
15:53
it shows errors
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
I think I've explored this entire iceberg
Avatar
Avatar
Jupstar ✪
@Ryozuki do you also have it that u have to run cargo clean very often after doing git pull, because rust-analyser is too stupid xd do you know a workaround other then rebuilding? normal building does not help
hmm idk
15:55
too bad i cant find a rust iceberg
15:55
its just the game
Avatar
Is there a reason we still have gfx_asyncrender_old? Seems like it causes the client to be rendered only when the graphics are idle. Looks like double-clicking behaves somewhat differently depending on this config variable: https://github.com/ddnet/ddnet/issues/7052#issuecomment-1695933782
Double click to add another envelope point On the second click, keep holding the left mouse button down. Move the mouse somewhere else so it's not directly above the previous point (the selecti...
Avatar
Avatar
Robyt3
Is there a reason we still have gfx_asyncrender_old? Seems like it causes the client to be rendered only when the graphics are idle. Looks like double-clicking behaves somewhat differently depending on this config variable: https://github.com/ddnet/ddnet/issues/7052#issuecomment-1695933782
what value do u want it to be?
Avatar
Good question, does it even make any difference besides this one bug?
Avatar
well for gameplay i'd set it to 1
15:58
and for demo recording it must be 0
15:58
demo -> video
Avatar
I've used 0 most of the time it seems, whereas marmare used 1
Avatar
1 is also the default
15:58
0 + vsync = huge delays
Avatar
The description also doesn't exactly make clear what is does: Do rendering async from the the update
Avatar
well it's not directly wrong
15:59
just not directly right xD
16:00
it allows the updates to happen independent of the gfx updates independent of the refresh rate set
Avatar
Avatar
Learath2
I think I've explored this entire iceberg
new to me: #include <iosfwd> (forward decls for #include <iostream>, zapcc compiler (seems to be just a caching compiler?), std::remove (wtf!), rvalue references are lvalues (TIL), initialization matrix (what's this?), the for loop is broken (what's this?), const std::string bitand (wtf ^^), herbceptions (interesting)
Avatar
Avatar
Jupstar ✪
0 + vsync = huge delays
So is there any reason to set it to 0 except internally when rendering a demo?
16:01
If there isn't, then we don't need the variable
Avatar
Avatar
Robyt3
If there isn't, then we don't need the variable
there is a usecase, i can illustrate
16:03
if you set gfx_refresh_rate 0 async_render_old 0 vsync 0 but use cl_refresh_rate x > 0 then that basically means you always want to wait for the GPU to finish the current execution before continuing resulting in cl_refresh_rate being pretty accurate for FPS target which lowers your CPU usage which noby wanted deperately xD
Avatar
I see. I'll try to update the description though
Avatar
yes, but for input stuff, can you tell what exactly causes it?
16:05
i've seen this years ago, but then it was fixed some day
Avatar
Don't know what exactly causes this. I think I also just randomly got the bug with gfx_asyncrender_old 1, so maybe it's a very precise timing for the bug with gfx_asyncrender_old 1
Avatar
would it maybe make sense to queue inputs for the UI the biggest problem is, that it's really weird that the UI relies on Input during a gfx cycle
Avatar
Seems like the release key press from the double click consistently goes through with gfx_asyncrender_old 0 but not most of the time with gfx_asyncrender_old 1
16:07
Most of the input handling is really messed up TBH
16:07
We mostly poll if a certain key was pressed in a specific update frame
Avatar
mh ok
16:08
egui uses a queue for example
Avatar
Everything should go though the event listener if this were to be done cleanly (edited)
Avatar
yeah
Avatar

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-addresss...
Avatar
"Do updates independent from rendering and refresh rate"
16:21
i hardly get it
16:22
a user even less
16:22
xd
Avatar
well that's what it does xd
Avatar
what updates
16:22
the banana updates
Avatar
the alternative is putting a book into the description
16:22
explaining what input updates are
Avatar
and what gfx cycles are
Avatar
input updates!
16:23
just put input updates then
Avatar
im guessing it doesnt have to wait until the refresh wait until it updates game stuff like tee position and all that stuff
Avatar
well and physics updates
16:23
and network updates
Avatar
non-graphic updates
Avatar
xd
Avatar
@Robyt3
Avatar
well would be fair
Avatar
gfx is threaded regardless of this right
Avatar
Do non-graphics related updates independent of graphics related updates xd almost looks like u could use a parenthesis here as if it was math
Avatar
"Finish rendering before update"
16:26
again
16:26
xd
Avatar
Wait for the GPU to finish the current execution before doing a new cycle xddd
Avatar
i canceled the merge
Avatar
the problem is, it's not even correct i think
Avatar
gfx_finish does nothing with Vulkan
16:27
With OpenGL is makes rendering slow though, as expected
Avatar
yes
16:27
it doesnt exist
16:28
i think it was removed in opengl 4 generally
16:28
maybe xd
Avatar
Comment your suggestions on the PR so I don't forget
16:29
I knew this would cause bike-shedding
Avatar
ok i add the second
Avatar
Avatar
Robyt3
I knew this would cause bike-shedding
this isnt bike shedding
Avatar
c++ (!AsyncRenderOld || m_pGraphics->IsIdle()) && (!GfxRefreshRate || (time_freq() / (int64_t)g_Config.m_GfxRefreshRate) <= Now - LastRenderTime) if asyncrender == 0 and (no refresh rate is set OR we are in a refresh cycle) DO if (asyncrender == 1 and graphics are idle) and (no refresh rate is set OR we are in a refresh cycle) DO
Avatar
its being proper
Avatar
so the refresh part is actually not correct anyway
Avatar
Rewrite description in Lojban, nice
Avatar
whats Lojban
Avatar
Lojban (pronounced [ˈloʒban] (listen)) is a logical, constructed, human language created by the Logical Language Group which aims to be syntactically unambiguous. It succeeds the Loglan project. The Logical Language Group (LLG) began developing Lojban in 1987. The LLG sought to realize Loglan's purposes and further improve the language by making...
16:36
@Robyt3 i shared this at my work
16:36
Ithkuil is an experimental constructed language created by John Quijada. It is designed to express more profound levels of human cognition briefly yet overtly and clearly, particularly about human categorization. It is a cross between an a priori philosophical and a logical language. It tries to minimize the vagueness and semantic ambiguity in n...
Avatar
Avatar
Ryozuki
someone mentioned this https://en.wikipedia.org/wiki/Ithkuil
looks like Ravies new pfp
Avatar
If you squint it looks like a very abstract representation of a tee
Avatar
A Petri net, also known as a place/transition (PT) net, is one of several mathematical modeling languages for the description of distributed systems. It is a class of discrete event dynamic system. A Petri net is a directed bipartite graph that has two types of elements: places and transitions. Place elements are depicted as white circles and ...
Avatar
anyone noticed that discord lately always highlights the channels as if you hover them with your mouse
Avatar
Petri nets were invented in August 1939 by Carl Adam Petri—at the age of 13—for the purpose of describing chemical processes.
16:39
ok
16:39
13y old made this
16:39
time to retire
Avatar
Avatar
Jupstar ✪
anyone noticed that discord lately always highlights the channels as if you hover them with your mouse
didnt that always happen
Avatar
Avatar
Voxel
didnt that always happen
do you also know the reason why?
16:40
i find it very distracting and creepy xd
Avatar
to know what channel you're hovering over
Avatar
well i am not hovering them xD
Avatar
oh wait are you talking about what channel you're IN?
Avatar
no
16:41
it does that over all channels, from top to bottom
16:41
for like 1 second total (for all)
16:41
like a wave xd
Avatar
ok well it might be just you
Avatar
i've seen that on mobile and pc now
Avatar
Maybe bug maybe easter egg
Avatar
I'm the chosen one
16:42
epic
Avatar
That's why some developers have a "no easter egg" policy
Avatar
boring devs
16:43
we need to add easter eggs to ddnet
Avatar
we have at least one xd
16:43
when u have a potato pc
Avatar
DDNet doesn't even add literal easter eggs to maps at Eastern, like Teeworlds does
Avatar
i think we had a april fools event
Avatar
Avatar
Ewan
Click to see attachment 🖼️
captured clearly here
Avatar
Creating a separate PR for every change will be a bit tedious, so I split the changes by commits instead. I hope this is fine. Also I'm not sure how many commits can reasonably be included in a PR.

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...
Avatar
we should add a command "javascriptify" that limits fps to 24
gigachad 1
16:44
ez easter egg
Avatar
we should add a command called "rustify" where the game doesnt run because it panics
16:46
xd
16:46
javify = allocate 5gb of ram
16:46
or more
Avatar
https://twitter.com/gf_256/status/1285217798642454531 why would you need to capture a global variable anyway? and why am I looking at twitter memes?
So THIS is why gcc is so slow!
Likes
3596
Retweets
1404
Avatar
nitter.net (edited)
16:47
my twitter account is banned xD
Avatar
Avatar
heinrich5991
https://twitter.com/gf_256/status/1285217798642454531 why would you need to capture a global variable anyway? and why am I looking at twitter memes?
epic
Avatar
Avatar
Jupstar ✪
my twitter account is banned xD
too much furries right
16:51
pepeW
Avatar
more: https://twitter.com/gf_256/status/1624082143294136323 c++ $ cat loop.cpp #include <iostream> int main() { while(1) ; } void unreachable() { std::cout << "Hello world!" << std::endl; } $ clang++ loop.cpp -O1 -Wall -o loop $ ./loop Hello world!
16:51
wtf 😄
Avatar
Avatar
Ryozuki
too much furries right
i've literally done nothing xdd
Avatar
probably infinite side-effect-free loops banned in C++?
Avatar
Avatar
heinrich5991
more: https://twitter.com/gf_256/status/1624082143294136323 c++ $ cat loop.cpp #include <iostream> int main() { while(1) ; } void unreachable() { std::cout << "Hello world!" << std::endl; } $ clang++ loop.cpp -O1 -Wall -o loop $ ./loop Hello world!
fake
16:51
it loops for me
16:52
oh
Avatar
i've heard of that before
Avatar
it works
16:52
lol
16:52
O1 makes it work
16:52
without it it loops
Avatar
Avatar
Ryozuki
fake
I literally copy-pasted it from my console ^^
16:53
i put o1 instead of O1
16:53
in my firs try xd
16:55
i read its
16:55
linker UB
16:55
the linker optimized out the main
16:55
but idk if true
16:56
int main() { while(1) ; } void unreachable() { std::cout << "Hello world!" << std::endl; }
Avatar
looks like the compiler just decided that main is UB and didn't emit any assembly for it 😄
Avatar
Avatar
heinrich5991
https://twitter.com/gf_256/status/1285217798642454531 why would you need to capture a global variable anyway? and why am I looking at twitter memes?
TIL about odr-
16:59
xd
17:00
The One Definition Rule (ODR) is an important rule of the C++ programming language that prescribes that classes/structs and non-inline functions cannot have more than one definition in the entire program and template and types cannot have more than one definition by translation unit. It is defined in the ISO C++ Standard (ISO/IEC 14882) 2003, at...
17:00
well i knew but not the name i guess
Avatar
this just came into my head does ddnet even have a proper code style
Avatar
i once saw a project with this thing on it
Avatar
Avatar
Voxel
i once saw a project with this thing on it
black is a python formatter
17:02
we use clang format
17:02
for c++ code
Avatar
Avatar
heinrich5991
looks like the compiler just decided that main is UB and didn't emit any assembly for it 😄
main is UB, it lacks return statement
😃 2
Avatar
Avatar
Chairn
main is UB, it lacks return statement
doesn't need one, never exits the function
Avatar
ah true
Avatar
@heinrich5991 aha!
18:38
i found
18:38
Case // a.cc #include <iostream> int main() { while(true) ; } void unreachable() { std::cout << "Hello world!" << std::endl; } Reproduction clang++ -O1 a.cc ./a.out This...
18:39
interesting convo
Avatar
“Over-aggressively optimization”
Avatar
This fixes the sorting of demos which I accidentally broke after implementing demo searching (#7069).

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
  • [ ] Te...
Avatar
@Learath2
20:18
RTL
20:30
new way
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
Forbidden indentation
Avatar
Avatar
Ryozuki
@Learath2
Obviously the first option
20:41
That's the only correct way
Avatar
First one for everything but functions and classes + no huddled else
Avatar
Avatar
Learath2
Forbidden indentation
türksün dimi
👍 1
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
it already triggers me that the last brace has an indentation
Avatar
Avatar
Jupstar ✪
it already triggers me that the last brace has an indentation
Didn't even spot that ew
Avatar
@Learath2 yeni çeviriyi ben yaptım göz attın mı?
Avatar
@kaan english only in #developer
Avatar
Avatar
kaan
@Learath2 yeni çeviriyi ben yaptım göz attın mı?
Görmedim, bakiim bi, and yep english only here 😄
Avatar
Avatar
heinrich5991
@kaan english only in #developer
I'm sorry
Avatar
you better be AsukaGun
Avatar
currently it bugs back and forth and highlights free-view aswell as multi-view. reproduce this on my server by spectating someone, then using left mouse button (click-to-spectate feature from 0.7) and this will happen while in multiview
Avatar
Avatar
kaan
@Learath2 yeni çeviriyi ben yaptım göz attın mı?
#7060 ?
Avatar
I have finished the rest of the Turkish translation, which now covers 100%.
Avatar
Avatar
Learath2
#7060 ?
yes
Avatar
💀 what are you writing
Avatar
  • L1133, L1136, L1139 are missing colons.
  • Typo on L1157 UPD -> UDP
  • L1175 points -> puan?
  • L1241, context needs to be checked, should probably be "oyuncu" again
  • L1335 and co, should probably be "kesit" or some other word, "kesim" doesnt quite make sense to me
  • L1422 veri tabanı birleşik olması lazım
  • L1475 might be too long, need to check
21:05
Skimmed over it real quick, these are the issues I saw. Yoj can take a look or I can take a look later. Thank you for your contribution
21:05
s/Yoj/You/
Avatar
Tysm, will look into it again
Avatar
ChillerDragon BOT 2023-08-28 21:29:22Z
faak gh 2fa?
Avatar
2b07832 Don't register to ipv6 when ipv4only is enabled. - furo321 8f73a9e Fix style - furo321 b24b11f Move sv_ipv4only check to OnConfigChange - furo321 ee32ceb Merge pull request #7092 from furo321/pr_fix_ipv4only_registering - heinrich5991
Avatar
Avatar
heinrich5991
more: https://twitter.com/gf_256/status/1624082143294136323 c++ $ cat loop.cpp #include <iostream> int main() { while(1) ; } void unreachable() { std::cout << "Hello world!" << std::endl; } $ clang++ loop.cpp -O1 -Wall -o loop $ ./loop Hello world!
what??
Avatar
just c++ things
Avatar
2dcc0b9 Fix demo sorting - furo321 28fda86 Keep selection after sort - furo321 04f7133 Merge pull request #7096 from furo321/fix-demo-sorting - def-
Avatar
we really should look into getting some sort of events system for jobs
23:46
having no way to communicate between threads without polling a status variable or something really is not ideal
23:46
especially if that's the intended avenue for new multithreaded stuff'
Avatar
chillerdragon BOT 2023-08-28 23:59:44Z
lmao
Replying to @Ryozuki jm4557db2vkb1.jpg
Exported 438 message(s)