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 2023-05-12 00:00:00Z and 2023-05-13 00:00:00Z
Avatar
Avatar
Learath2
Looks about right to me, what's wrong?
I must do a POST request on a link and save the returned json (edited)
Avatar
What's this used for?
Avatar
Avatar
heinrich5991
tell me what you want to do and I might be able to give you some example code
Use POST and pass Json params (edited)
Avatar
Avatar
Voxel
some day im going to clean up the pngs of ddnet
anyways: this is the hypothetical i was talking about:
Avatar
Would be cleaner yeah
Avatar
Avatar
Voxel
What's this used for?
Just look in the source. I doubt it's used in-game
05:28
Maybe in 07
Avatar
Yeah it's unused. And omg the png would look so much cleaner without it,
05:30
wait whats that blue bar for
05:30
was it for the old ninja timer?
Avatar
Yes
05:30
But not old
05:30
07
Avatar
okay wait, let me sort everything out really quickly. some of these are UI elements, not map items
Avatar
Updated:
05:43
Take 2 on HUD: much more optimized, less blank space
Avatar
You should leave empty space
Avatar
actually this may be doable, if we make a script to convert old type pngs to the new lauout
05:43
layout
Avatar
ok fine old one is used then
Avatar
Probably even mkre
05:44
because
05:45
if new icons are added, it would fuck up old pngs and it would also require the client to be modified to support the larger image
Avatar
expanding the image down or right and supporting it is not hard
Avatar
Thats true
05:45
But backward compatibility
Avatar
is this better?
Avatar
(@backwardserich5991)
Avatar
@Voxel make the same pngs but with the grid info
05:47
and i make a rust script
05:47
gigachad
Avatar
works for me
Avatar
@Ryozuki rust fast?
05:47
fastest
Avatar
woaw
Avatar
i want to make sure everything is finalized before i make coords
Avatar
500gb/s
justatest 1
05:51
wait are all the ninja dash streaks the same side in code? (checking right now)
05:53
yeah they are
05:55
idk what happened but when i split the image theres this weird ending trail thats cut off in one of the ninja muzzles
05:59
05:59
this is awkward (edited)
Avatar
same case goes for another one, which also has a cut off piece
Avatar
trigger warning
Avatar
its ok, we can fix it when the svg gets accepted into the database ^^
Avatar
Should I wait until we get more opinions before I make coords? And would the coords have to be formatted like in content.py?
Avatar
you can’t fix it without changing the code. it looks for that resource in that place, the coordinates have to be in the same relative position
06:13
all the svg scripts do is export at a larger size
Avatar
extras, game, hud, particles, strong_weak > hud, map_items, particles, weapons
Avatar
Avatar
fokkonaut
You should leave empty space
ok im starting to see what you mean
06:27
theres a ton of empty space in the original images
Avatar
Avatar
Voxel
Should I wait until we get more opinions before I make coords? And would the coords have to be formatted like in content.py?
What resolution do they have btw
Avatar
lets make it 4k
06:33
who needs to support potatoes
Avatar
It's even worse, I'm asking BCS i want to know if they are power of two textures
06:35
So actual potatoes xdd
06:36
1995 gang xddd
Avatar
oh tru
06:41
@Voxel tex needs to be 2**x
06:42
size
06:42
128,256,512,1024
Avatar
yeah yea
06:43
everything is on a 32x32 grid
Avatar
the total image size i mean
Avatar
Avatar
Voxel
is this better?
are you trying to trace vanilla gameskin?
Avatar
one second
Avatar
Avatar
Souly
are you trying to trace vanilla gameskin?
rearranging
Avatar
Avatar
Voxel
everything is on a 32x32 grid
Power of two, not multiply of two
Avatar
@Voxel what for lmao
Avatar
2^x
Avatar
Avatar
Jupstar ✪
Power of two, not multiply of two
one seconnndd im getting the image sizes for everything
Avatar
Avatar
Jupstar ✪
2^x
2**5
Avatar
Avatar
Jupstar ✪
What resolution do they have btw
weapons.png : 704 x 448 particles.png : 348 x 512 map_items.png : 256 x 384 hud.png : 384 x 384
Avatar
Avatar
Souly
@Voxel what for lmao
game.png kind of sucks right now
Avatar
Well might not matter anyway. Forgot we split them anyway
07:01
For pixel perfection xd
Avatar
Avatar
Voxel
game.png kind of sucks right now
ye i kinda get the point
08:12
what annoys me the most is the fact that you need to update the whole gameskin even if you just want to change one single thing
Avatar
Yep, I'd not use an texture atlas again for most stuff
08:16
Even at the cost of sightly higher load time
Avatar
Avatar
Voxel
idk what happened but when i split the image theres this weird ending trail thats cut off in one of the ninja muzzles
This was like that since I've made the templates for gameskin
Avatar
Avatar
Souly
what annoys me the most is the fact that you need to update the whole gameskin even if you just want to change one single thing
yeah
Avatar
Avatar
Voxel
its ok, we can fix it when the svg gets accepted into the database ^^
Once it is done (and hopefully Nexus comes back), we'll progressively accept SVGs to teeskins
Avatar
would be cool if we could maybe overwrite some gameskin part with additional file or something
Avatar
like making your own template?
Avatar
like if u have laser.png next to game.png it would show the laser from the second file or something
Avatar
If there would be a text file which you can read the size of each weapon and paste it into the game with the appropriate size and position, it would be possible
Avatar
Avatar
Voxel
Should I wait until we get more opinions before I make coords? And would the coords have to be formatted like in content.py?
i think this is a huge benefit for when we want to add more things like map items or particles it's healthily set up in a way where you can add more to the right or bottom
Avatar
Avatar
Souly
like if u have laser.png next to game.png it would show the laser from the second file or something
oh
Avatar
i mean its not a big issue for me personally because i can use things like gimp
08:27
but it would make it easier for sure
Avatar
of course i'll add a bit of whitespace but other than that i feel like this would be a game changer
Avatar
Avatar
Voxel
i think this is a huge benefit for when we want to add more things like map items or particles it's healthily set up in a way where you can add more to the right or bottom
Easier to manage storing Assets on databases too, as in we can just use an online editor API to edit SVGs (like color, size and outline) and let them implement their own
08:28
Damn I wish I knew typescript so that I can help Nexus
08:28
xd
Avatar
Avatar
Voxel
of course i'll add a bit of whitespace but other than that i feel like this would be a game changer
Problem would be having other client migrate to that version, but I think it's for the better
08:30
It opens an opportunity to implement many things which would've made older / other clients broken
Avatar
probably would require some asset loading priority
08:30
so it would support both
08:30
but load the new one over the old
Avatar
It would need to recreate the old Assets from the new ones and load it into memory, so that other clients can see what Assets they use
08:31
Other than that, It should be fine
08:33
But this is what I'm getting at right now, because of other clients that don't depend on the newer versions of DDNet, it's made in a limited or restricted way. DDNet cannot expand as is right now
Avatar
HUD is now updated so that we don't have to rearrange everything, just add more things into it
Avatar
Please also nice the weapon Shields there
Avatar
yes, please nice them
Avatar
I still don't understand why they are in game png
Avatar
They are not HUD so why should they be in hud.png? They are part of the game like health pickups
Avatar
I mean, aren't these rendered onto the map? Like the flags?
Avatar
Arent entities' hearts for floating hearts?
08:39
same for shields?
Avatar
Avatar
Robyt3
They are not HUD so why should they be in hud.png? They are part of the game like health pickups
The. Extras png
08:40
But not game png. They are entities on the map
Avatar
if we make this update i highly doubt we need an extras.png (edited)
08:40
i doubt this will ever see the light of day but extras is the most useless thing ever (edited)
Avatar
Tbh just stop using texture atlasses all along
08:41
They make customization impossible
08:41
Tomorrow someone adds a new map item and all customized map item png get incslid
08:42
Invalid
Avatar
why not just yoink the 0.7 asset system kek
Avatar
So what? Are you saying make each and every thing seperate?
Avatar
Yes
08:42
Later in the client we do this anyway
Avatar
Yeah why not, only load things which need to be loaded
Avatar
Can't argue with that
08:43
I wanted to seperate weapons into their own things anyways
08:43
So I guess this is the only logical step after that
Avatar
After what I experience in Teeworlds Data, changing one weapons and calling it a complete set, while the original is almost identical... It really makes you think that you can save a loooot of VRAM if we just separate weapons into their own category
Avatar
Avatar
Jupstar ✪
Yep, I'd not use an texture atlas again for most stuff
cant we make the atlast at runtime, or is it worthless at that point
Avatar
Then also change the structure a bit. Weapons in weapons directory. Map items in Map items etc
Avatar
Avatar
Ryozuki
cant we make the atlast at runtime, or is it worthless at that point
We currently do the opposite xd
Avatar
ye would be nice
Avatar
We split them to render pixel perfect
Avatar
@Jupstar ✪ i mean the point is to load just 1 texture so it uses less ram, and reuse parts of it for the weapons etc right
08:45
oh
Avatar
ahm no
Avatar
so u end up loading it as multiple images?
Avatar
This also makes it easier to add more useless things! Like seperate explosion graphics for seperate objects! (This is a joke)
Avatar
ye, and good thing is, most duplicate texture parts in Assets would not need to be loaded at all, saving resources
Avatar
aka u upload 6 textures instead of 1
08:46
to gpu
Avatar
f.e: if you load 100 Assets which 30 has the same hook, then separating them will make you load only 1 hook and any other original asset parts will be loaded
Avatar
Avatar
Voxel
This also makes it easier to add more useless things! Like seperate explosion graphics for seperate objects! (This is a joke)
why not
Avatar
ChillerDragon BOT 2023-05-12 08:48:06Z
@heinrich5991 if i edit libtw2s gamenet loader.py how do i generate the json files?
08:48
./generate_all didnt do anything
Avatar
Avatar
Ryozuki
why not
because people would be nosy about it again
08:48
like it'd be a fun detail but is it really nessicary?
Avatar
ignroe it
Avatar
Avatar
Voxel
like it'd be a fun detail but is it really nessicary?
depends on the community justatest
Avatar
@Jupstar ✪ i get a vulkang segfault on closing client
08:49
[Switching to Thread 0x7fffed90e6c0 (LWP 7581)] 0x00007ffff4f0fc70 in _XSend () from /usr/lib64/libX11.so.6 (gdb) bt #0 0x00007ffff4f0fc70 in _XSend () at /usr/lib64/libX11.so.6 #1 0x00007ffff4f0600a in XQueryExtension () at /usr/lib64/libX11.so.6 #2 0x00007ffff4ef96f2 in XInitExtension () at /usr/lib64/libX11.so.6 #3 0x00007ffff4ec536d in XextAddDisplay () at /usr/lib64/libXext.so.6 #4 0x00007fffedfc9e6f in () at /usr/lib64/libGLX_nvidia.so.0 #5 0x00007fffedfeb665 in () at /usr/lib64/libGLX_nvidia.so.0 #6 0x00007fffded4d499 in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #7 0x00007fffded4b86c in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #8 0x00007fffded4cf9f in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #9 0x00007fffded3f7fc in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #10 0x00007fffded3fdfe in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #11 0x00007fffded3ffc1 in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #12 0x00007fffedfea7bc in () at /usr/lib64/libGLX_nvidia.so.0 #13 0x00005555557490b5 in CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4224 #14 CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4220 #15 CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(bool) (this=0x555555c7a630, ForceSwapChainDestruct=ForceSwapChainDestruct@entry=true) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5451 #16 0x000055555574eb64 in CCommandProcessorFragment_Vulkan::CleanupVulkan<true>() (this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5462 #17 0x000055555575ee90 in CCommandProcessorFragment_Vulkan::Cmd_Shutdown(CCommandProcessorFragment_GLBase::SCommand_Shutdown const*) (pCommand=0x555556850f50, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6649 #18 CCommandProcessorFragment_Vulkan::RunCommand(CCommandBuffer::SCommand const*) (this=0x555555c7a630, pBaseCommand=0x555556850f50) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6529 #19 0x00005555557672d6 in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) (this=0x555555c7c580, pBuffer=<optimized out>) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:335 #20 0x0000555555763186 in CGraphicsBackend_Threaded::ThreadFunc(void*) (pUser=pUser@entry=0x555555ad02a0) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:63 #21 0x00005555556f4de7 in thread_run(void*) (user=<optimized out>) at /home/edgar/data/ddnet/src/base/system.cpp:764 #22 0x00007ffff53efaa3 in () at /lib64/libc.so.6 #23 0x00007ffff5471b5c in () at /lib64/libc.so.6
08:49
Avatar
we have nvidia-driver-530 yk
Avatar
colors better xd
Avatar
If we end up splitting all the game images and reordering them in folders, then we should just do this with all images once to get a better structure (including stuff like file icons, demo buttons, emoticons, etc.)
Avatar
yeah the rewor needs to be done in 1 go
08:50
for everything
08:50
with scripts to convert old pngs to new
08:50
so custom assets are kept
Avatar
Avatar
Ryozuki
with scripts to convert old pngs to new
or the other way around for compatibility
Avatar
idc about backwards compat
Avatar
me too gigachad
Avatar
then why u say that
08:51
xd
Avatar
idk, I had a brain damage for this moment
08:51
latest rls gang
08:51
gigachad
Avatar
Avatar
Ryozuki
@Jupstar ✪ i mean the point is to load just 1 texture so it uses less ram, and reuse parts of it for the weapons etc right
It won't necessarily use less ram. Also more textures don't mean more bandwidth. However it might mean using memory less effectively BCS it's in different locations
Avatar
ChillerDragon BOT 2023-05-12 08:51:42Z
got it @heinrich5991 python3 serialize.py --version 0.7 raw/teeworlds-0.7.5.py > spec/teeworlds-0.7.5.json
Avatar
nobo chiller
08:52
nobody cares about 0.7
08:52
@Jupstar ✪ any hint on why the segfault happens?
Avatar
Avatar
Robyt3
If we end up splitting all the game images and reordering them in folders, then we should just do this with all images once to get a better structure (including stuff like file icons, demo buttons, emoticons, etc.)
Wait, so how would it work when you want to actually customize it? What would this look like?
Avatar
Avatar
Ryozuki
[Switching to Thread 0x7fffed90e6c0 (LWP 7581)] 0x00007ffff4f0fc70 in _XSend () from /usr/lib64/libX11.so.6 (gdb) bt #0 0x00007ffff4f0fc70 in _XSend () at /usr/lib64/libX11.so.6 #1 0x00007ffff4f0600a in XQueryExtension () at /usr/lib64/libX11.so.6 #2 0x00007ffff4ef96f2 in XInitExtension () at /usr/lib64/libX11.so.6 #3 0x00007ffff4ec536d in XextAddDisplay () at /usr/lib64/libXext.so.6 #4 0x00007fffedfc9e6f in () at /usr/lib64/libGLX_nvidia.so.0 #5 0x00007fffedfeb665 in () at /usr/lib64/libGLX_nvidia.so.0 #6 0x00007fffded4d499 in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #7 0x00007fffded4b86c in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #8 0x00007fffded4cf9f in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #9 0x00007fffded3f7fc in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #10 0x00007fffded3fdfe in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #11 0x00007fffded3ffc1 in () at /usr/lib64/libnvidia-glcore.so.525.116.03 #12 0x00007fffedfea7bc in () at /usr/lib64/libGLX_nvidia.so.0 #13 0x00005555557490b5 in CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4224 #14 CCommandProcessorFragment_Vulkan::DestroySwapChain(bool) (ForceDestroy=true, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:4220 #15 CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(bool) (this=0x555555c7a630, ForceSwapChainDestruct=ForceSwapChainDestruct@entry=true) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5451 #16 0x000055555574eb64 in CCommandProcessorFragment_Vulkan::CleanupVulkan<true>() (this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:5462 #17 0x000055555575ee90 in CCommandProcessorFragment_Vulkan::Cmd_Shutdown(CCommandProcessorFragment_GLBase::SCommand_Shutdown const*) (pCommand=0x555556850f50, this=0x555555c7a630) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6649 #18 CCommandProcessorFragment_Vulkan::RunCommand(CCommandBuffer::SCommand const*) (this=0x555555c7a630, pBaseCommand=0x555556850f50) at /home/edgar/data/ddnet/src/engine/client/backend/vulkan/backend_vulkan.cpp:6529 #19 0x00005555557672d6 in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) (this=0x555555c7c580, pBuffer=<optimized out>) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:335 #20 0x0000555555763186 in CGraphicsBackend_Threaded::ThreadFunc(void*) (pUser=pUser@entry=0x555555ad02a0) at /home/edgar/data/ddnet/src/engine/client/backend_sdl.cpp:63 #21 0x00005555556f4de7 in thread_run(void*) (user=<optimized out>) at /home/edgar/data/ddnet/src/base/system.cpp:764 #22 0x00007ffff53efaa3 in () at /lib64/libc.so.6 #23 0x00007ffff5471b5c in () at /lib64/libc.so.6
Enable Vulkan layers. Can't imagine why it crashes
Avatar
crap forgot to untag robyt
Avatar
@Jupstar ✪ odd, my ddnet from gentoo ebuild doesnt crash
Avatar
Avatar
Voxel
Wait, so how would it work when you want to actually customize it? What would this look like?
It would need a window rework pepekek
Avatar
rm -rf build/* env CXXFLAGS='-march=native -mtune=native' cmake -S . -B build/ \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -GNinja \ -DDEV=ON \ -DVULKAN=ON \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ln -f -s build/compile_commands.json compile_commands.json
08:53
it uses mold by default, thats pog
Avatar
Avatar
Voxel
Wait, so how would it work when you want to actually customize it? What would this look like?
Maybe provide shortcut buttons that select entire sets that have the same name
Avatar
Avatar
Jupstar ✪
Enable Vulkan layers. Can't imagine why it crashes
how to do that
Avatar
Avatar
Ryozuki
how to do that
Start with dbg_gfx 4
Avatar
Avatar
Voxel
Wait, so how would it work when you want to actually customize it? What would this look like?
For a start we could use the directory name.. e.g. default is weapons/default/*.png We can display them similar to here in a group
08:55
That's also how entities do it btw
Avatar
yeah, just show them the same as before grouped, so you can select all of them at the same time
Avatar
2023-05-12 10:55:48 I vulkan: deallocated chunk of memory with size: 196608 for frame 1 (buffer) 2023-05-12 10:55:48 I vulkan: deallocated chunk of memory with size: 196608 for frame 1 (buffer) Segmentation fault
Avatar
It must be Vulkan error if it's a detection by a VK layer
08:56
Also u need to install them
08:56
Dunno if they exist for Nvidia
Avatar
i got vulkan-layers
Avatar
Oh man, you know what would be great? I don't think this will be optimal for real time gameplay but what if you could choose random weapons for each tee for demo rendering/playback?
Avatar
Avatar
Voxel
ddnetSuggestion ddnet What if there was a tick box where if you have more than 1 game skin or emoticon pack every tee except yours is assigned a random one to keep? Like, everyone on a team has a different hammer look or grenade but they all function the same.
i had this idea before
Avatar
Yes it's a long time suggestion
08:58
Like with everything our network code sucks
08:58
Before someone won't convince Heinrich to finally break with it it will create bloat
08:59
I mean for non random
08:59
E.g. a player sends his selection
08:59
Random is weird xd
08:59
But i like the idea of customization
09:00
i need to add new netobjs for damage indicator, spawn particles, etc so i can apply opacity correctly
Avatar
Avatar
Jupstar ✪
Random is weird xd
imagine you can send over particles too custom grenade explosions
09:02
🔥
Avatar
@Jupstar ✪ ok, it segfaults on master, but not on 16.9 tag
09:03
im gonna find the commit
Avatar
I don't want to go into detail but i talked to Heinrich. It's not that he dislike suchs ideas. It's simply that he wants such features always be downward compatible. So nice dreams but probably not maintainable. Esp. Since most contributions are not high quality and/or not highly tested
Avatar
yeah he wantsb ackwards compat
09:04
idk why so much
09:04
we could make so much improvements
09:04
way more modularity
09:04
no ugly code
Avatar
Avatar
Ryozuki
@Jupstar ✪ ok, it segfaults on master, but not on 16.9 tag
Oh weird indeed
Avatar
This is a proposal for replacing EntityEx with new netobjects, like suggested in #5860. Adds a new DDNetPickup that includes switch number a new DDNetProjectile that replaces the old one (which is...
Avatar
Why do you want to split game.png anyway?
Avatar
❯ git bisect bad c8b69dd8156a4a36656d0467845ca9b02d20fc18 is the first bad commit commit c8b69dd8156a4a36656d0467845ca9b02d20fc18 Author: Robert Müller <robytemueller@gmail.com> Date: Wed May 10 20:51:25 2023 +0200 Properly uninitialize all client components Track stack of cleaner functions that destruct client components so exactly the correct cleanup is performed in the reverse order of initialization. This allows performing the cleanup also in the early-return cases without introducing duplicate code. src/engine/client/client.cpp | 61 +++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 23 deletions(-)
09:14
@Jupstar ✪ found it
09:14
its this
09:14
causes segfault
09:14
@Robyt3 !!
Avatar
ChillerDragon BOT 2023-05-12 09:14:35Z
```bash xd
Avatar
Avatar
Learath2
Why do you want to split game.png anyway?
because its trash + incompatable and hard to update
Avatar
Caused by #6577 ``` c8b69dd8156a4a36656d0467845ca9b02d20fc18 is the first bad commit commit c8b69dd8156a4a36656d0467845ca9b02d20fc18 Author: Robert Müller Date: Wed May 10 20:51:25 2023 +0200 Properly uninitialize all client components Track stack of cleaner functions that destruct client components so exactly the correct cleanup is performed in the reverse order of initialization. This allows performing the cleanup also in the early-return cases without intro...
Avatar
added the trace there
09:16
xd
Avatar
I'll take a look later
Avatar
ok thx
Avatar
Avatar
Voxel
because its trash + incompatable and hard to update
Trash is hard to define. Incompatible with what? Why is 5 different images easier to update than 1? To me it seems that the steps would be about the same
Avatar
Avatar
Learath2
Trash is hard to define. Incompatible with what? Why is 5 different images easier to update than 1? To me it seems that the steps would be about the same
diferent images allows more custom options tho
Avatar
did you read the whole convo
Avatar
ye read backlog
Avatar
Avatar
Voxel
did you read the whole convo
Mostly skimmed through it where you were talking about how you can add cool new graphics and how it’d break backwards compatibility. Neither are very convincing reasons to do it
Avatar
@Learath2 do u know why gdb says warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
Avatar
Avatar
Ryozuki
diferent images allows more custom options tho
This is about the only benefit I can think of
Avatar
Avatar
Ryozuki
@Learath2 do u know why gdb says warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
Nope, sorry boss
09:21
Sounds unimportant
Avatar
@Learath2 any fancy plugin scripts for gdb u use?
09:22
i wanna make my gdb powerful
09:22
or is lldb better
Avatar
I use GEF while reverse engineering
09:23
lldb shows column too
09:23
not just line
Avatar
Avatar
Learath2
I use GEF while reverse engineering
It’s not as useful when debugging software you have the source to
Avatar
Avatar
Learath2
I use GEF while reverse engineering
What are u reverse engineering?
Avatar
* thread #5, name = 'DDNet', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) frame #0: 0x00007ffff4f0fc70 libX11.so.6`_XSend + 48 libX11.so.6`_XSend: -> 0x7ffff4f0fc70 <+48>: movq (%rax), %rsi 0x7ffff4f0fc73 <+51>: andl $0x1, %edx 0x7ffff4f0fc76 <+54>: movq %rsi, (%rsp) 0x7ffff4f0fc7a <+58>: jne 0x7ffff4f0fdb9 ; <+377> (lldb) bt * thread #5, name = 'DDNet', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) * frame #0: 0x00007ffff4f0fc70 libX11.so.6`_XSend + 48 frame #1: 0x00007ffff4f0600a libX11.so.6`XQueryExtension + 170 frame #2: 0x00007ffff4ef96f2 libX11.so.6`XInitExtension + 50 frame #3: 0x00007ffff4ec536d libXext.so.6`XextAddDisplay + 77 frame #4: 0x00007fffedfc9e6f libGLX_nvidia.so.0`___lldb_unnamed_symbol3788 + 239 frame #5: 0x00007fffedfeb665 libGLX_nvidia.so.0`___lldb_unnamed_symbol4144 + 69 frame #6: 0x00007fffded4d499 libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75337 + 313 frame #7: 0x00007fffded4b86c libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75283 + 124 frame #8: 0x00007fffded4cf9f libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75329 + 31 frame #9: 0x00007fffded3f7fc libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75086 + 316 frame #10: 0x00007fffded3fdfe libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75094 + 110 frame #11: 0x00007fffded3ffc1 libnvidia-glcore.so.525.116.03`___lldb_unnamed_symbol75095 + 17 frame #12: 0x00007fffedfea7bc libGLX_nvidia.so.0`___lldb_unnamed_symbol4127 + 60 frame #13: 0x00005555558379ee DDNet`CCommandProcessorFragment_Vulkan::DestroySwapChain(this=0x0000555555f99f60, ForceDestroy=true) at backend_vulkan.cpp:4224:25 frame #14: 0x000055555583bfda DDNet`CCommandProcessorFragment_Vulkan::CleanupVulkanSwapChain(this=0x0000555555f99f60, ForceSwapChainDestruct=true) at backend_vulkan.cpp:5451:19 frame #15: 0x0000555555857c60 DDNet`void CCommandProcessorFragment_Vulkan::CleanupVulkan<true>(this=0x0000555555f99f60) at backend_vulkan.cpp:5462:27 frame #16: 0x000055555583fd56 DDNet`CCommandProcessorFragment_Vulkan::Cmd_Shutdown(this=0x0000555555f99f60, pCommand=0x0000555557150d10) at backend_vulkan.cpp:6649:22 frame #17: 0x000055555583f613 DDNet`CCommandProcessorFragment_Vulkan::RunCommand(this=0x0000555555f99f60, pBaseCommand=0x0000555557150d10) at backend_vulkan.cpp:6529:20 frame #18: 0x00005555558d0a63 DDNet`CCommandProcessor_SDL_GL::RunBuffer(this=0x0000555555f8f6c0, pBuffer=0x00007fffffffd390) at backend_sdl.cpp:335:38 frame #19: 0x00005555558cf7bb DDNet`CGraphicsBackend_Threaded::ThreadFunc(pUser=0x0000555555de32a0) at backend_sdl.cpp:63:34 frame #20: 0x00005555557ceae7 DDNet`::thread_run(user=0x0000555555edd8d0) at system.cpp:764:12 frame #21: 0x00007ffff53efaa3 libc.so.6`___lldb_unnamed_symbol3510 + 707 frame #22: 0x00007ffff5471b5c libc.so.6`___lldb_unnamed_symbol3936 + 11
Avatar
Avatar
Ryozuki
or is lldb better
Mh, gdb I find easier to use, but they are about the same in capability
Avatar
lldb shows more info for me
09:24
i think u can tell clang to make lldb optimized debug info
09:24
atleast thats a thing in llvm iirc
Avatar
Oh I remember one feature in lldb that’s nice, it has full support for c++ syntax. So you can do method calls in expressions easily
Avatar
Avatar
Jupstar ✪
What are u reverse engineering?
Mostly ctfs, though it’s been a while since I had time to do one
09:27
i want this merged
09:28
i noticed we got 33prs there
09:28
starting to look like tw xd
09:29
Avatar
Avatar
Ryozuki
starting to look like tw xd
Yeah AnyaSob
09:31
Maybe I’ll do a review day tomorrow
Avatar
i would merge stuff, but im not confident in havent missed stuff
09:31
having not*
09:31
english broke
09:45
why does clang doesnt find it
09:45
its annoying sometimes
09:46
clangd*
Avatar
Do you have your compile_commands set properly? Does clangd even use them?
Avatar
same thing happens in vscode
09:47
09:47
i have -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
09:47
and it knwos the type of functions
09:47
if i hover on em
09:47
so its like partially knows
09:51
idk
09:51
oh
09:51
it onl happens in .h files
09:51
The error occuring in an .h but not in a .cpp file may indicate that clangd is treating the .h file as a C header rather than a C++ header.
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
Maybe it's actually not included. I had such things too after the header include refactor
Avatar
ok it already treats it as c++ header
Avatar
ChillerDragon BOT 2023-05-12 09:53:43Z
!rust wot a function without body?
Avatar
chillerbot4 BOT 2023-05-12 09:53:43Z
@Ryozuki
09:53
how does that work
Avatar
dude its a extern fn
Avatar
ChillerDragon BOT 2023-05-12 09:54:08Z
pub fn create_dissector_handle() -> dissector_handle_t;
Avatar
its just inside and extern block
Avatar
ChillerDragon BOT 2023-05-12 09:54:17Z
so its a c func?
Avatar
same as pub extern fn
09:54
ye
Avatar
ChillerDragon BOT 2023-05-12 09:54:22Z
hm
Avatar
linked
09:54
libtw2 uses old rust
09:54
for lot of stuff
09:54
and also heinrich style
Avatar
ChillerDragon BOT 2023-05-12 09:54:42Z
ye libtw is old
Avatar
i dont like it much
Avatar
ChillerDragon BOT 2023-05-12 09:54:45Z
hater
09:54
we know
Avatar
ChillerDragon BOT 2023-05-12 09:55:03Z
stop bully heinrich
09:55
i his fan
Avatar
Avatar
Ryozuki
i dont like it much
09:57
it it compiles it means vec2 ends up there right
09:57
but why clangd doesnt find it
09:57
smh
09:57
rust-analyzer best
Avatar
ChillerDragon BOT 2023-05-12 09:57:29Z
once again im stuck at hello world in rust fml
Avatar
Avatar
Ryozuki
but why clangd doesnt find it
Try including the base vmath thing there and see if that helps?
10:00
Idk how these tools resolve things when they aren't included in this file but the previous one includes both
Avatar
Avatar
Learath2
Try including the base vmath thing there and see if that helps?
it helps
10:02
but heinrich will say its a useless include
10:03
10:03
same happens in otherp laces
10:03
sux
10:03
c++ tooling bad
Avatar
ChillerDragon BOT 2023-05-12 10:03:39Z
skill issue
10:04
have you tried using eclipse c++ instead of vim?
10:05
@Ryozuki "i noticed we got 33prs there" where?
Avatar
Avatar
Ryozuki
but heinrich will say its a useless include
Is it really? I think it's fine, the include guard will stop it from being included and it's only strictly correct with the include no?
Avatar
Do you happen to know if there is any possibility inside a .rs file to hide the keyword unsafe from a user? E.g. in c it's simply #define notunsafe unsafe
Avatar
ChillerDragon BOT 2023-05-12 10:05:53Z
trol
Avatar
This is a serious question if u mean me
Avatar
ChillerDragon BOT 2023-05-12 10:06:26Z
i mean u
Avatar
Avatar
Learath2
Is it really? I think it's fine, the include guard will stop it from being included and it's only strictly correct with the include no?
but this happens in many header files
Avatar
ChillerDragon BOT 2023-05-12 10:06:32Z
If you are looking for an alternative to C's #define, there is nothing that will allow arbitrary words to be used as keywords (which is probably a good thing).
Avatar
cant we just use c++20 modules
10:06
or 22
10:06
i forgot
Avatar
Avatar
Ryozuki
cant we just use c++20 modules
Don't know if it helps here
Avatar
ChillerDragon BOT 2023-05-12 10:06:54Z
ryo where we got 33prs?
Avatar
I'd bet the tooling is even worse for those
Avatar
c++ headers are one of the hardest things to parse on earth
10:07
in ddnet chiller
Avatar
Avatar
Ryozuki
c++ headers are one of the hardest things to parse on earth
I'd go so far to say that they are unparseable
Avatar
ChillerDragon BOT 2023-05-12 10:07:28Z
who is we? xd
10:07
ah u mean open?
Avatar
ye dumbo
Avatar
ChillerDragon BOT 2023-05-12 10:07:40Z
fakof
10:07
!jup maybe a macro can hide it away
Avatar
chillerbot4 BOT 2023-05-12 10:07:54Z
@Jupstar ✪
Avatar
Avatar
Ryozuki
ye dumbo
Reported for being rude. You'll be banished to the shadow realm
Avatar
ChillerDragon BOT 2023-05-12 10:08:16Z
!jup cargo add custom-unsafe-macro then call that and slap ur code in
Avatar
chillerbot4 BOT 2023-05-12 10:08:16Z
@Jupstar ✪
Avatar
Avatar
Learath2
Reported for being rude. You'll be banished to the shadow realm
i added a o to not be rude
Avatar
ChillerDragon BOT 2023-05-12 10:08:55Z
i added a fakof to not sound serious
Avatar
I bet it was just a typo
Avatar
dumbo is the elephant
Avatar
ChillerDragon BOT 2023-05-12 10:09:10Z
lol
10:09
im safe
Avatar
I'll ban you to be safe
Avatar
ChillerDragon mh yeah thought about that. Shit xddd
Avatar
ChillerDragon BOT 2023-05-12 10:09:35Z
u tryna detect unsafe rust?
Avatar
Avatar
Jupstar ✪
Do you happen to know if there is any possibility inside a .rs file to hide the keyword unsafe from a user? E.g. in c it's simply #define notunsafe unsafe
there is with macros
10:09
but u can add a forbid unsafe_code in the top level
Avatar
Avatar
ChillerDragon
u tryna detect unsafe rust?
unsafe rust? from ryo?
10:10
impossible
Avatar
ChillerDragon BOT 2023-05-12 10:10:08Z
also there is generated code that can introduce unsafe code
Avatar
Avatar
Cellegen
unsafe rust? from ryo?
i do it everyday at work
Avatar
ChillerDragon BOT 2023-05-12 10:10:22Z
im sure rust macros could generate could that gets added to compilation
10:10
code*
Avatar
I am thinking about a way to make sure unsafe is not used at all for an API. Maybe I should simply disallow extern creates
Avatar
rust macros can do anything
10:10
in sqlx they verify a sql query is valid
10:10
by checking with the db
10:10
at compile itme
10:10
time
Avatar
Avatar
Ryozuki
rust macros can do anything
Yeah, they are a problem
10:11
Can u disable them xd
Avatar
well the ones that can do anything are the procdural macros
Avatar
ChillerDragon BOT 2023-05-12 10:11:15Z
yea so i can write a rust macro that generates rust code and includes it in the compiled end result using the unsafe keyword without using the string "unsafe"
Avatar
Yep
Avatar
i mean u cant avoid this
10:11
for example another attack vector is build.rs
Avatar
Avatar
Jupstar ✪
I am thinking about a way to make sure unsafe is not used at all for an API. Maybe I should simply disallow extern creates
Just don't expose any unsafe functions?
Avatar
it executes on build time
10:12
forbid unsafe is the best bet
Avatar
Avatar
Learath2
Just don't expose any unsafe functions?
I cannot control the code directly
Avatar
u mean a dependency?
Avatar
I can only analyse it
Avatar
safe rust can be evil too
Avatar
But i could compile it. So maybe inject forbid unsafe... But how safe would that be
10:12
The user could simply allow it again
Avatar
Who would lie to you about being unsafe anyway?
Avatar
ChillerDragon BOT 2023-05-12 10:13:08Z
there are hacky macros to check for panics maybe there is something for unsafe too
Avatar
forbid unsafe checks the current library has no unsafe usage
Avatar
Avatar
Learath2
Who would lie to you about being unsafe anyway?
Someone who executes code on my computer
Avatar
it works for macros too
10:13
it detects everything
10:13
but only for ur crate
Avatar
Avatar
Jupstar ✪
Someone who executes code on my computer
You can execute evil code without unsafe too
10:13
safe rust is not sandboxed
Avatar
Avatar
Learath2
You can execute evil code without unsafe too
It has no access to system api
Avatar
Avatar
Ryozuki
safe rust is not sandboxed
Yeah it's sandboxed
Avatar
Rhai - An embedded scripting language for Rust. Contribute to rhaiscript/rhai development by creating an account on GitHub.
Avatar
You can open files in safe rust. You mean no unsafe anywhere in any call chain?
Avatar
Avatar
Ryozuki
@Jupstar ✪ use this https://github.com/rhaiscript/rhai
I need good performance
Avatar
Avatar
Jupstar ✪
I need good performance
it should have good perf
10:15
Avatar
Avatar
Learath2
You can open files in safe rust. You mean no unsafe anywhere in any call chain?
I actually have code that is sandboxed completely except for a specific API. And all I need here is memory safety
10:15
The API must be robust anyway
Avatar
chillerbot4 BOT 2023-05-12 10:15:56Z
@Jupstar ✪
Avatar
ChillerDragon BOT 2023-05-12 10:16:03Z
its not unsafe related but panic
10:16
A Rust attribute macro to require that the compiler prove a function can't ever panic.
Avatar
the panic case is hard
Avatar
Panic is not a problem
Avatar
ChillerDragon BOT 2023-05-12 10:16:36Z
maybe unsafe gets caught by that too
Avatar
I can control abortion
Avatar
panic is not unsafe
10:16
nobo
Avatar
ChillerDragon BOT 2023-05-12 10:16:52Z
but is unsafe panic?
Avatar
unsafe needs to deal with panics
10:17
but not the other way around
10:17
a panic is safe
10:17
unsafe needs to deal with panics in the way of assuming stuff
Avatar
ChillerDragon BOT 2023-05-12 10:17:31Z
yes but can a unsafe not panic?
Avatar
unsafe can panic
10:17
safe c an panic
Avatar
ChillerDragon BOT 2023-05-12 10:17:46Z
will it always?
Avatar
So you get a piece of code to execute in a sandbox. You already limited the api to the outside. Just disallow external crates and std in the 'sandboxed' code?
Avatar
ChillerDragon BOT 2023-05-12 10:18:28Z
i mean the no-panic crate ensures that your program wont compile if you have the possibility to panic. if unsafe introduces that possibility then you catch those as well
Avatar
Yeah but e.g. using a vec should be allowed again xD
Avatar
related to unsafe and panick (unwinds): https://doc.rust-lang.org/nomicon/unwinding.html
The Dark Arts of Advanced and Unsafe Rust Programming
10:18
Rust has a tiered error-handling scheme:
>
If something might reasonably be absent, Option is used. If something goes wrong and can reasonably be handled, Result is used. If something goes wrong and cannot reasonably be handled, the thread panics. If something catastrophic happens, the program aborts.
10:18
xd
Avatar
I just need to make sure the vec is not nullptr for example once the API gets this vec
Avatar
Mh expose vecs through your api
10:20
You can't let them use std, if they can use std they can do anything
Avatar
Mhh I dunno
Avatar
Avatar
Ryozuki
Rust has a tiered error-handling scheme:
>
If something might reasonably be absent, Option is used. If something goes wrong and can reasonably be handled, Result is used. If something goes wrong and cannot reasonably be handled, the thread panics. If something catastrophic happens, the program aborts.
And if you get an our of memory then throw your hands up in the air since there is nothing you can do in Rust
Avatar
Fwiw I think you should use something like wasm, it's performant enough nowadays
Avatar
I guess the sandbox itself needs support for checking memory safety here :/
Avatar
Avatar
deen
And if you get an our of memory then throw your hands up in the air since there is nothing you can do in Rust
there is try_ stuff getting in
10:21
but yeah
Avatar
Avatar
Learath2
Fwiw I think you should use something like wasm, it's performant enough nowadays
Yes. But if I want the wasm module to call host functions
10:21
impl Fallible collections on allocation errors, quite as describe in RFC 2116 This was used in the turbofish OS hobby project to mitigate the the lack of faillible allocation in rust.
10:21
@deen
10:22
this got a push thanks to linux
Avatar
Avatar
Jupstar ✪
Yes. But if I want the wasm module to call host functions
You can export host functions to wasm. Just need to be selective with what you expose. No direct file opening mechanisms
Avatar
Avatar
Learath2
You can export host functions to wasm. Just need to be selective with what you expose. No direct file opening mechanisms
And how does it handle data types?
Avatar
In a very ugly manner 😄
Avatar
Well this is with simple data types
10:26
Is there also a complex example?
Avatar
u probs need to make them repr C
10:26
but idk
10:26
i never used this
Avatar
Forget passing complex types, you have something like an array, something like a dict, bools, ints, doubles iirc
Avatar
A dictionary? So a hashmap?
10:28
Mh ok anyway, guess have to think what exactly i want
Avatar
I think they called them tables tho I'm not a web assembly expert
Avatar
User-oriented fork of LLVM's opt-viewer. Contribute to OfekShilon/optview2 development by creating an account on GitHub.
Avatar
Guess I need to use json strings 😂😂 javascript kiddos
Avatar
utf-16 ftw
10:31
ah i read js
10:31
xd
10:33
@Learath2 how do u prevent oom or do something if a alloc fails in c++?
10:33
ah i guess malloc simply returns a nullptr? xd
Avatar
Avatar
Ryozuki
ah i guess malloc simply returns a nullptr? xd
Yes
Avatar
but i bet 99% of ppl dont check nullptr on malloc
10:34
we certainly dont
Avatar
And in C++ it's either nullptr or new throws
Avatar
Avatar
Ryozuki
but i bet 99% of ppl dont check nullptr on malloc
I always check mine religiously
10:34
but malloc is tricky right
10:34
cuz overcommit
10:34
in linux
10:34
it can give u all u want
Avatar
guys... already 500+ messages and it's not even noon...
Avatar
well nobody forces u to read em kek
10:35
mainly a discussion about images and my segfault
10:35
which wouldnt happen in rust (probs)
Avatar
Avatar
Chairn
guys... already 500+ messages and it's not even noon...
But Friday
Avatar
Avatar
Ryozuki
it can give u all u want
Yep, return of malloc doesnt mean much nowadays 😛
Avatar
Avatar
Ryozuki
i would merge stuff, but im not confident in havent missed stuff
same here 🙂
Avatar
Avatar
Chairn
same here 🙂
merge my pr it will be fine
10:42
kek
Avatar
I'll merge it later
brownbear 1
Avatar
on the image thing, i don't think it's a good idea to split to small files
Avatar
https://www.twitch.tv/videos/1817384336 i did the fixes of the pr yesterday, it took me 1h cuz i forgot abotu the stupid m_Teams, im certainly rusty
Avatar
we would lose thematic games doing so, but we can maybe split them in software and allow a lot more option directly in game (like a split game icons option)
Avatar
the video has no voice btw xd
Avatar
Avatar
Chairn
we would lose thematic games doing so, but we can maybe split them in software and allow a lot more option directly in game (like a split game icons option)
We lost what?
10:46
U mean that it will not look fitting design wise?
Avatar
Avatar
Jupstar ✪
But Friday
sorry, im working hard on friday too 😄
10:46
yes, like thematic game.png, such as Pipou's
Avatar
Why would we loose it
10:46
He can create a game bundle just like now
Avatar
we need to ask the resident designer ravie
Avatar
Avatar
Ryozuki
the video has no voice btw xd
Boring
Avatar
im not sure it's more practical, gotta ask graphics people @Pipou @Voxel
Avatar
Avatar
Jupstar ✪
Boring
i know, hence the title
Avatar
Avatar
Ryozuki
we need to ask the resident designer ravie
He always has opposite opinion to mine
Avatar
10 minutes before my 2nd audition 🙂
Avatar
Very simple xd
Avatar
Avatar
Chairn
10 minutes before my 2nd audition 🙂
audition for?
Avatar
Avatar
Ryozuki
we need to ask the resident designer ravie
@Ravie
Avatar
Avatar
Ryozuki
audition for?
associate professor position
10:48
idk what that means but nice, or my condolences
10:48
(insert meme here)
10:49
10:49
xd
Avatar
Xd
Avatar
Avatar
Chairn
associate professor position
Are u then rich enough to buy win10?
Avatar
my mind is not poor enough to do that
Avatar
just use linux
10:50
if my teacher told me he uses windows
Avatar
soon(tm)
Avatar
i would respect him less
Avatar
XD
Avatar
i use linux for almost everything
10:50
except games
10:50
sadly
Avatar
I use it for everything
Avatar
i teach RISC-V on linux
Avatar
Games that don't work are not worth it from the start
Avatar
we really need #dev-offtopic
10:51
but sometimes i wanna try those aaa games
Avatar
to not pollute this channel 😄
Avatar
Avatar
Chairn
i teach RISC-V on linux
😎
Avatar
and make use of my 3080
Avatar
Avatar
Ryozuki
and make use of my 3080
Steal 4090 from sis
Avatar
@Jupstar ✪ i went to her house and installed the 4090 vertically
10:52
it was like usual before, b ut we couldnt close the case
10:52
this time it worked
10:52
its a massive brick
10:52
vertical i mean like this
10:53
@Jupstar ✪ 190 fps on cyberpunk with the new rtx mode
10:53
and the fans barely spinning
10:53
55c iirc
10:53
she has a slow ram i told her to change tho
Avatar
Xd
10:54
i hope nvidia releases a new gpu
10:54
so i can get this 4090
10:54
kek
Avatar
Avatar
Jupstar ✪
Games that don't work are not worth it from the start
But genshin has waifus
Avatar
do u rly play genshin
10:54
i got bored in 10 mins
10:55
but genshin is played by all egirl weebs
10:55
well most egirls play valoran
10:55
xdd
10:55
valorant
10:55
boring game too
10:55
csgo is better
Avatar
Avatar
Ryozuki
do u rly play genshin
Ofc, the music is amazing and the story is pretty interesting
Avatar
oh it has story
Avatar
And it has waifus, it's good enough for me
11:00
@Patiga have you been writing an essay for the last hour or is mobile discord glitching? 😄
Avatar
scrolling through the chat, I blame discord bluekitty
11:03
@Jupstar ✪ btw what was your reasoning to drop the texture atlas? most of them do not have pixels at the borders of each segment. for example skin, emote, (most?) of game
Avatar
Avatar
Patiga
@Jupstar ✪ btw what was your reasoning to drop the texture atlas? most of them do not have pixels at the borders of each segment. for example skin, emote, (most?) of game
That still scales them a bit
Avatar
what scales them?
Avatar
Because u have to remove texeloffset
11:04
From the texture coordinates
11:04
If u don't do this, it will bleed
Avatar
ow what is a texel-offset?
11:05
if the textures within the atlas don't touch the border, it shouldn't be a problem, right?
Avatar
If ur IMG is 1024*1024 it's 1/1024
Avatar
Avatar
Patiga
if the textures within the atlas don't touch the border, it shouldn't be a problem, right?
But then it's luck
11:05
It only works under this circumstance
Avatar
afaik we don't have anti-aliasing on guns and tees, right?
Avatar
We don't do multi sampling for individual render calls
11:07
Only full screen
11:08
Or only framebuffer
11:08
Would be more correct
Avatar
I'm confused. multi-sampling != mip-maps, right? did I falsely believe that ddnet uses mip-maps?
Avatar
Ddnet uses mipmap
Avatar
alongside multi-sampling, or are they used in different places?
Avatar
Avatar
Chairn
@Ravie
yeah?
Avatar
Avatar
Patiga
alongside multi-sampling, or are they used in different places?
We only use multi sampling on the global framebuffer
11:11
We don't implement any other kind of anti aliasing
Avatar
so we render a larger image and then multi-sample it down?
Avatar
Avatar
Ryozuki
but i bet 99% of ppl dont check nullptr on malloc
Doesn't matter much for a game. For some DBMSes I consider it essential not to crash on OoM, but to handle it better
Avatar
Avatar
Patiga
so we render a larger image and then multi-sample it down?
I'm a bit confused rn. Why larger image
11:15
Ssaa, super sampling, does that afaik
11:15
Multi sample averages between neighbors pixels. Or is the name ambiguous?
Avatar
We only use multi sampling on the global framebuffer
I didn't understand this. is the global framebuffer the frame that gets presented, or one step before that?
Avatar
Avatar
Patiga
We only use multi sampling on the global framebuffer
I didn't understand this. is the global framebuffer the frame that gets presented, or one step before that?
That's a hard question. It's actually multiple framebuffer images that combine into one in the last step xD
Avatar
i'm sure this has been answered recently enough but i can't find it how do you get the check mark on your server? i see kog also has it so i know it's not ddnet exclusive, what hoops do you have to jump through to get "verified"
Avatar
So u could say it's after the fragment shader but before written to the output image i think
11:18
@Patiga i feel like we drifting away, what was the original question?
11:18
Why I do pixel perfect
👍 1
11:19
BCS without Texel offsets we can bleed
11:19
Even if just hypothetically
11:19
At least the hook would bleed
11:19
Since the chain hits the edge
Avatar
true, I currently handle the hook differently because it has to be rendered alongside the tee
Avatar
ChillerDragon BOT 2023-05-12 11:21:02Z
Still not too sure on how to read rust docs how do i create a CStr that is not nul terminated? https://doc.rust-lang.org/core/ffi/struct.CStr.html
Representation of a borrowed C string.
Avatar
so you have a texture for each atlas segment if I understand correctly, does that mean you have one draw call for each body part of each tee?
Avatar
ChillerDragon BOT 2023-05-12 11:22:41Z
ah this should do CStr::from_bytes_until_nul() sorry for rubberducking in this channel
Avatar
cstr is null terminated
11:22
a str or string isnt
Avatar
ChillerDragon: is there context to your message in the chatlog? I don't think you are supposed to have a CStr without a nul byte
Avatar
ChillerDragon BOT 2023-05-12 11:23:08Z
no context no brain
11:23
i probably do it wrong xd
Avatar
what r u doing
11:23
cstr is only useful for ffi
Avatar
ChillerDragon BOT 2023-05-12 11:23:28Z
trying to print a message in rust xd
Avatar
why using cstr
Avatar
check the example code
Avatar
ChillerDragon BOT 2023-05-12 11:23:38Z
im segfaulting since 1h on hello world
Avatar
cstr is safe
Avatar
Avatar
Patiga
so you have a texture for each atlas segment if I understand correctly, does that mean you have one draw call for each body part of each tee?
Yes
Avatar
does it guarantee termination
Avatar
define termination
Avatar
\0 at the end
Avatar
cstr guarantees the str has a nul byte
11:24
its the stupid C requirement
Avatar
also for each single particle? seems not that trivial to group them @Jupstar ✪
Avatar
in rust code itself u should use str though, its more optimized
Avatar
to be fair the only other way was to keep track of string lengths directly which would be even more of a pain
Avatar
Avatar
Patiga
also for each single particle? seems not that trivial to group them @Jupstar ✪
No
Avatar
but yes i hate c string termination too
Avatar
Avatar
Ewan
i'm sure this has been answered recently enough but i can't find it how do you get the check mark on your server? i see kog also has it so i know it's not ddnet exclusive, what hoops do you have to jump through to get "verified"
anyone know
Avatar
Avatar
Patiga
also for each single particle? seems not that trivial to group them @Jupstar ✪
It gets grouped as much as possible
11:25
But the particle groups are new draw calls indeed
Avatar
chiller check rust_version.rs
Avatar
ChillerDragon BOT 2023-05-12 11:26:45Z
ah no ryo in tw codebase im rust wizzard dont worry
11:27
im trying to log to console in libtw2 wireshark dissector
11:27
i kinda manage but it segfaults or doesnt print at all
Avatar
Avatar
Patiga
also for each single particle? seems not that trivial to group them @Jupstar ✪
But since u ask I'd only allow squares for particles here and use a texture array rather than atlas
Avatar
ChillerDragon BOT 2023-05-12 11:27:47Z
11:27
F
Avatar
in ffi u have to be careful on the rust side
11:28
if u pass a object to cpp
11:28
cuz rust drops
11:28
use leak to give ownership to cpp side
Avatar
ChillerDragon BOT 2023-05-12 11:28:31Z
if i def it in place?
Avatar
mem forget
Avatar
ChillerDragon BOT 2023-05-12 11:28:40Z
hm k
Avatar
drop happens at the end of scope
11:28
Takes ownership and “forgets” about the value without running its destructor.
Avatar
ChillerDragon BOT 2023-05-12 11:29:01Z
ye got it
11:29
thanks
11:29
ima try
Avatar
A wrapper to inhibit compiler from automatically calling T’s destructor. This wrapper is 0-cost.
11:30
Takes ownership and “forgets” about the value without running its destructor.
Avatar
Avatar
Jupstar ✪
But since u ask I'd only allow squares for particles here and use a texture array rather than atlas
ah do you actually group the entire particles png together in an texture-array, or only the same-sized ones? if you do actually group the entire thing together, would you consider also grouping the entire game.png together?
Avatar
ChillerDragon BOT 2023-05-12 11:31:51Z
still abort ._.
11:32
maybe its wireshark commiting suicide because i use fatal log level
🦈 1
Avatar
try debug level
Avatar
Avatar
Patiga
ah do you actually group the entire particles png together in an texture-array, or only the same-sized ones? if you do actually group the entire thing together, would you consider also grouping the entire game.png together?
Currently it's not done at all. I don't think that our particle system is build in a intelligent way anyway I think we already talked about pros and cons Generally batching is obv better of the runtime. However it also means that u either need own sampling as for texture atlasses. Or u need texture arrays with equally sized images. Game PNG is simply too diverse for that
11:33
If we wouldn't care about ogl1.x I'd do the first
Avatar
ChillerDragon BOT 2023-05-12 11:34:30Z
ok got it finally it was be not being able to rtfm https://zillyhuhn.com/cs/.1683891254.png
Avatar
Avatar
Ewan
anyone know
Mh the checkmark thing was supposed to be ddnet only. But then people started aggressively ddosing the masters, so we had to add some 3rd party servers to info.json, those ended up also getting the checkmark
Avatar
ChillerDragon BOT 2023-05-12 11:35:01Z
@heinricj5991 did you code ur dissector without print driven debugging? xd
Avatar
Avatar
Learath2
Mh the checkmark thing was supposed to be ddnet only. But then people started aggressively ddosing the masters, so we had to add some 3rd party servers to info.json, those ended up also getting the checkmark
So there is no process for it since it's not even intended as far as I know
Avatar
I do realize we were here before, but we do come from the direction off ddnet this time ^^. well if you would choose batching, would you go the texture atlas or texture array path? :)
Avatar
@Patiga u can also do multi texturing if u write a pipeline for all game elements anyway
11:35
U should have a guarantee of 16 images per shader
11:36
Maybe in fact I'd do that
Avatar
hm that does seem a bit extreme, even to me :p. The different images do seem mostly separated in a sensible way (except that game png and skin png mix during tee rendering)
Avatar
Avatar
Patiga
hm that does seem a bit extreme, even to me :p. The different images do seem mostly separated in a sensible way (except that game png and skin png mix during tee rendering)
What is extrem?
Avatar
well I feel like I try to batch together much more stuff than ddnet currently does
11:38
(and at times am struggling coz of this a little ^^)
Avatar
The only downside is that it doesn't lay in continuous memory which might hurt the cache a tiny bit
Avatar
and throwing literally everything into the same shader goes quite extreme in that direction
Avatar
Avatar
Patiga
well I feel like I try to batch together much more stuff than ddnet currently does
And how does multi texturing prevent that
Avatar
Avatar
Learath2
So there is no process for it since it's not even intended as far as I know
how did KOG and noby's get it?
Avatar
Mh thinking of it, maybe only newer ogl versions allow index accessing a shader array tho
Avatar
with multiple images attached you do get the problem of not being able to use the simple textureSample, because it isn't safe to use when in the same execution unit you might need to sample different textures (in wgpu its called non-uniform control flow)
Avatar
Sampler array*
Avatar
Avatar
Patiga
with multiple images attached you do get the problem of not being able to use the simple textureSample, because it isn't safe to use when in the same execution unit you might need to sample different textures (in wgpu its called non-uniform control flow)
Even for indexing?
Avatar
Avatar
Ewan
how did KOG and noby's get it?
The second sentence. During the big ddos incident the masters were completely unusable, so we had to put some people in the ddnet list
11:42
(the ddnet list used to be over http even before the http masters)
Avatar
I don't get it. Were they ddossing based on the check mark?
Avatar
Avatar
Jupstar ✪
Even for indexing?
no, not for indexing. I thought you wanted to have multiple textures in your bind group and choose dynamically which one to sample (your number 16, led me to believe that somehow)
Avatar
Avatar
Ryozuki
nobody cares about 0.7
please do not lazily diminish other people's work
Avatar
Avatar
Ewan
I don't get it. Were they ddossing based on the check mark?
Servers inside ddnet-info.json get the checkmark. When the master servers were down, people could only play on ddnet servers. People asked us to add other servers to our list so they can show up aswell even when the masters are down. We add servers to the list, they get the checkmark as a side-effect
Avatar
Avatar
Patiga
no, not for indexing. I thought you wanted to have multiple textures in your bind group and choose dynamically which one to sample (your number 16, led me to believe that somehow)
Yes I want that over an index xd
11:45
I don't think that is a thing
Avatar
I dunno
11:45
I am sure desktop GPUs should support it
Avatar
Is there a way to get put into ddnet-info.json or do we just have to deal with being unavailable when the masters are down (and showing up lower in the server browser :/)
Avatar
Avatar
heinrich5991
please do not lazily diminish other people's work
to speak to or address in a witty and teasing manner; delude; challenge… See the full definition
Avatar
and if it was, the problem with the normal texture-sampling function should still be tehre
Avatar
Avatar
Patiga
and if it was, the problem with the normal texture-sampling function should still be tehre
Why
Avatar
Avatar
Ryozuki
why do you add default params if you pass it all the time anyway?
Avatar
cuz robyt asked
Avatar
Avatar
Ewan
Is there a way to get put into ddnet-info.json or do we just have to deal with being unavailable when the masters are down (and showing up lower in the server browser :/)
This was back in the day when the masters weren't http, current masters proved pretty resilient so there isn't need for that anymore. We have an issue somewhere github on how to revamp the internet tab #6506
Avatar
it's good practice
Avatar
Thoughts? Two positives I can think of: Minimal Moderation Needed: Official servers are exclusively listed under their designated tabs. People will always be able to locate our servers and refrain ...
Avatar
Avatar
Ewan
it's good practice
no
11:47
default params are bad
Avatar
is that ahot take
Avatar
i can remove em if u want @heinrich5991
Avatar
Avatar
Ewan
is that ahot take
no its as cold as ice
Avatar
Avatar
Ewan
Is there a way to get put into ddnet-info.json or do we just have to deal with being unavailable when the masters are down (and showing up lower in the server browser :/)
Fwiw the checkmark has nothing to do with sorting in the server browser
👍 1
Avatar
I'd use structs to do what default parameters do
11:48
That at least doesn't lead to typing the default value all the time
Avatar
Avatar
Learath2
This was back in the day when the masters weren't http, current masters proved pretty resilient so there isn't need for that anymore. We have an issue somewhere github on how to revamp the internet tab #6506
Oh actually it's #5654
Avatar
The current situation is unfair to good faith server owners whose servers don't have the checkmark, a more healthy way is to provide a way to apply to have the checkmark or be added to this new...
Avatar
I'd also would preferred not passing the value explicitly if it's equal to the default. Default parameters there would mean that forks don't need to change as much when merging this
Avatar
Avatar
Jupstar ✪
Do you happen to know if there is any possibility inside a .rs file to hide the keyword unsafe from a user? E.g. in c it's simply #define notunsafe unsafe
open /proc/self/mem
Avatar
Avatar
Jupstar ✪
Why
ah you seem to correct with the vulkan feature SampledImageArrayNonUniformIndexing
11:49
hmm wait I should look further first
Avatar
funny this is actually exactly what i'm asking about
Avatar
Avatar
Ewan
funny this is actually exactly what i'm asking about
for unique servers
Avatar
the places where alpha is epxlicitly and equal to default are mostly because we dont have the mechanisms to get whether our tee and the other differs in team, etc
11:49
less the ones for ur own effects
Avatar
Avatar
Patiga
ah you seem to correct with the vulkan feature SampledImageArrayNonUniformIndexing
Oh so an extension?
Avatar
yeah I think so
Avatar
i think the registration system is the best bet
Avatar
But yeah I think that would be the coolest solution
Avatar
ChillerDragon: to log to the console, use println!? ^^
Avatar
But since extension not practical for us xd
Avatar
Avatar
Ewan
for unique servers
I agree the current situation is less than ideal but there are 2 issues: 1) Figuring out what the new internet tab should look like 2) Finding a developer that has the time
Avatar
why can't internet tab be everyone
Avatar
Avatar
Ryozuki
use leak to give ownership to cpp side
probably not needed if you just call a function. it only needs to live as long as teh function call
Avatar
let trustworthy parties have the checkmark, don't change how it appears
11:51
would work fine
Avatar
@Patiga the simplest solution would be if textureOffset would also have a parameter for size
11:52
So textureoffsetanssize
Avatar
so just servers in peoples' closets and fakes won't have the check
Avatar
Avatar
heinrich5991
probably not needed if you just call a function. it only needs to live as long as teh function call
yeah, but i said if you want to give ownership :p
Avatar
Then atlasses would be useful in an easy way
Avatar
this is unclear from the outside. people see people bashing others for doing 0.7 work. this doesn't set a good tone for this chat. please stop doing that, even if it's "just a joke"
11:52
xd
11:52
Pray
Avatar
Avatar
Ewan
let trustworthy parties have the checkmark, don't change how it appears
It's hard to gauge who is trustworthy, it's very subjective. I'm pretty sure @Ryozuki wouldn't like it if his issue was resolved by me sitting here and handing out checkmarks to people I trust 😄
Avatar
well it wouldn't just be you
11:53
you elect mods that way don't you?
11:53
clean track record and has been around
11:53
do the same for servers
Avatar
Avatar
Jupstar ✪
@Patiga the simplest solution would be if textureOffset would also have a parameter for size
Ok NVM it would cause problems with mipmaps anyway
Avatar
Avatar
Learath2
It's hard to gauge who is trustworthy, it's very subjective. I'm pretty sure @Ryozuki wouldn't like it if his issue was resolved by me sitting here and handing out checkmarks to people I trust 😄
CEO Learath gives blue checkmarks out
Avatar
perhaps we can just get rid of the tabs altogether
Avatar
oh i like that idea
Avatar
Avatar
heinrich5991
this is unclear from the outside. people see people bashing others for doing 0.7 work. this doesn't set a good tone for this chat. please stop doing that, even if it's "just a joke"
i would say the outside is empty, i doubt anyone works for 0.7 at this point, just chiller
Avatar
Avatar
Ryozuki
i would say the outside is empty, i doubt anyone works for 0.7 at this point, just chiller
there are a lot of people watching this chat
Avatar
we should break compatibility, with 0.7, and with old clients
Avatar
they see that it's apparently okay to be lazily negative
Avatar
and rework
Avatar
Avatar
Ryozuki
we should break compatibility, with 0.7, and with old clients
(and what I see is not just banter here)
Avatar
well i said banter to chiller
11:55
im not bantering with u
11:56
one can say smth as a joke and still hold it in a serious discussion
Avatar
Chiller don't be sad, honey
Avatar
or smth like that
Avatar
what I mean is that you actually argue your point; i.e. now it seems like you actually meant it when you said that to chillerdragon
Avatar
well i meant
11:56
it
11:56
nothing wrong with it?
Avatar
yea, anyway. stop bantering in this chat
Avatar
yep lets be robots
Avatar
i don't understand why it's that serious, 0.7 is objectively a much less popular version of the game, therefore in comparison, nearly nobody cares about it
Avatar
speak formally
Avatar
Avatar
Jupstar ✪
Ok NVM it would cause problems with mipmaps anyway
yeah so I would still be interested if you yourself would go with a 1. texture atlas, 2. texture array and stretching all segments to the same size, 3. texture array and some only take up a part of the texture size ^^
Avatar
Avatar
Ewan
i don't understand why it's that serious, 0.7 is objectively a much less popular version of the game, therefore in comparison, nearly nobody cares about it
daring today arent we
Avatar
i've never touched it. i have no bias for or against it
11:57
i'm just saying
Avatar
I think u just have to write it like this @Ryozuki . 0.7 is not interesting for the future of our project in the current state
Avatar
0.7 is not interesting for the future of our project in the current state
Avatar
lol no
Avatar
Avatar
heinrich5991
perhaps we can just get rid of the tabs altogether
This is what I would do. Remove kog tab (maybe keep ddnet? we do have some extra functionality that idk how to expose to others, like finishes and region filtering), let everyone pass a "group_name", "group_key" in their server info, master server sends sha256(group_key) in the info, client groups by sha256(group_key) under name "group_name"
Avatar
Avatar
Learath2
This is what I would do. Remove kog tab (maybe keep ddnet? we do have some extra functionality that idk how to expose to others, like finishes and region filtering), let everyone pass a "group_name", "group_key" in their server info, master server sends sha256(group_key) in the info, client groups by sha256(group_key) under name "group_name"
if we remove kog tab, we remove the ddnet tab IMO
Avatar
The only issue is people faking entire networks, for which idk what to do
Avatar
the way to go is using the http master, enable advanced filter options
11:58
like ddnet has
11:58
for everyone
Avatar
I guess we could let all servers send region, so we can do the region filtering for everyone, the finishes idk how to do
Avatar
Avatar
Ryozuki
0.7 is not interesting for the future of our project in the current state
you can say that you're not interested in 0.7 stuff, and you can say that you think it's holding us back
11:58
why would you use such corporate speak? it just looks like lies
Avatar
Avatar
heinrich5991
you can say that you're not interested in 0.7 stuff, and you can say that you think it's holding us back
i say both
Avatar
Avatar
heinrich5991
why would you use such corporate speak? it just looks like lies
well u dont want banter
11:59
u rly make it seem like we should be corporate speakers
Avatar
no. I don't want to do that (edited)
11:59
you're allowed to say negative things
11:59
just not lazily
Avatar
whathever lazily means here
11:59
i have put lot of effort into ddnet
11:59
where is the laziness
Avatar
did you work on 0.7 heinrich
Avatar
Avatar
Patiga
yeah so I would still be interested if you yourself would go with a 1. texture atlas, 2. texture array and stretching all segments to the same size, 3. texture array and some only take up a part of the texture size ^^
I'm honestly struggling with an answer rn. E.g. if u'd write it I'd probably benchmarking it against using more draw calls. For particles it's defs interesting. But for tees that max at like 64 it might not be worth it. But generally spoken I'd probably then accept the badness of texture atlasses and write the sampling itself even if it's harder generally. Texture arrays are simply only interesting for similar sized stuff.. or split the draw calls with same sized stuff
Avatar
lazy means "not putting work into the criticism"
Avatar
being emotionally invested in ddnet, and seeing work on something that most likely, in my honest opinion, will end up not relevant or unused, is a bit sad
Avatar
Avatar
Ryozuki
whathever lazily means here
I guess "your work is shit" vs "your work is shit because you failed to do x, y and z"
Avatar
we can just improve ddnet more
Avatar
he's not even saying it's shit. just that people don't care about it
Avatar
true, i originally said nobody cares about it
12:01
which is not a total lie
12:01
nobody is exaggerated, there will always be 1 like chiller
12:01
its a way of speaking
Avatar
Avatar
Ryozuki
which is not a total lie
for civility, it doesn't really matter whether something is true or not
12:02
the way it's said matters
12:02
people are free to invest their time into whatever they want. time spent on 0.7 is not necessarily time lost for ddnet
12:02
it might just be time lost for playing some game
Avatar
ChillerDragon BOT 2023-05-12 12:02:36Z
@heinrich5991 "<heinrich5991> ChillerDragon: to log to the console, use println!? ^^"
Avatar
he is free to do whathever he wants yes
Avatar
ChillerDragon BOT 2023-05-12 12:02:40Z
OMG YES I JUST FIGURED OUT
Avatar
and me to say that
Avatar
Anyway, I need to do real world stuff like doing the dishes. @Ewan if you have any ideas about merging all lists put it in the issue, I think the desirables are -> some sort of trust structure -> some way to group servers -> some way to allow advanced filtering for all
Avatar
awesome Chiller
Avatar
ChillerDragon BOT 2023-05-12 12:03:01Z
i fuckin reimplemented all wireshark loggy all day to realize println! wasnt priting because the code was not even compiled xd
12:03
how can println not be compiled
Avatar
he didn't recompile his code
Avatar
and didn't sanity-check it
12:03
always try to check whether your changes are actually there 😉
12:04
maybe try to crash at the earliest possible opportunity
Avatar
Avatar
Jupstar ✪
I'm honestly struggling with an answer rn. E.g. if u'd write it I'd probably benchmarking it against using more draw calls. For particles it's defs interesting. But for tees that max at like 64 it might not be worth it. But generally spoken I'd probably then accept the badness of texture atlasses and write the sampling itself even if it's harder generally. Texture arrays are simply only interesting for similar sized stuff.. or split the draw calls with same sized stuff
thanks for answering so many questions even forcing an answer to a very opinionated question unprepared heartw I should probably try to understand the ddnet rendering code some time and not only small extracts of it happy
Avatar
Avatar
heinrich5991
open /proc/self/mem
How does that work btw. Is that something the rust compiler offers?
Avatar
Avatar
Jupstar ✪
How does that work btw. Is that something the rust compiler offers?
no, the linux kernel
12:04
you can simply edit your own memory using that file
Avatar
https://github.com/ddnet/ddnet/issues/5654#issuecomment-1198010235 I think I like this here, maybe we can make a milestone or something so someone can start implementing it?
The current situation is unfair to good faith server owners whose servers don't have the checkmark, a more healthy way is to provide a way to apply to have the checkmark or be added to this new...
Avatar
and easily do unsafe code
Avatar
with root right?
Avatar
Avatar
heinrich5991
you can simply edit your own memory using that file
Ah yeah I see
Avatar
Avatar
Ryozuki
with root right?
no, for your own program
Avatar
why is that allowed tho
Avatar
I think I read that before
Avatar
Avatar
Ryozuki
why is that allowed tho
Why not?
Avatar
Ub in safe rust xd
Avatar
Avatar
Ryozuki
why is that allowed tho
why not? the program can already do it via pointers
this 1
Avatar
Avatar
Learath2
Anyway, I need to do real world stuff like doing the dishes. @Ewan if you have any ideas about merging all lists put it in the issue, I think the desirables are -> some sort of trust structure -> some way to group servers -> some way to allow advanced filtering for all
i think the checkmark's presence should be based on some kind of vote, whether a server is verified or not be determined by what the master server says & not any local file. if the server is more robust now then i see no issue in this. as for advanced sorting, idk what that entails so i have no comment for now
Avatar
i guess
Avatar
ChillerDragon BOT 2023-05-12 12:06:00Z
now that i built the logger would you be interested heinrich?
Avatar
Couldn't the rust Api prevent it xd
Avatar
ChillerDragon BOT 2023-05-12 12:06:14Z
Avatar
The standard impl
Avatar
ChillerDragon: if you integrate it with the rust logging system, yes
Avatar
ChillerDragon BOT 2023-05-12 12:06:33Z
wot is rust logging system
Avatar
Avatar
Jupstar ✪
Couldn't the rust Api prevent it xd
If you want to expose fs to your user, you need to make your api forbid these things
Avatar
Avatar
ChillerDragon
wot is rust logging system
check tracing
12:06
A scoped, structured logging and diagnostics system.
Avatar
I'd probably go with log here, but they're interoperable
Avatar
log is old news
12:07
tracing is the future
Avatar
log is math
Avatar
A lightweight logging facade.
Avatar
ChillerDragon BOT 2023-05-12 12:07:22Z
idk what u guys talk about
Avatar
chiller u know what a logging facade is
Avatar
my client just crashed when tabbing into your server ChillerDragon
Avatar
ChillerDragon BOT 2023-05-12 12:07:41Z
whats the crash log
12:07
what server?
Avatar
Avatar
Learath2
If you want to expose fs to your user, you need to make your api forbid these things
you basically can't
Avatar
ChillerDragon BOT 2023-05-12 12:07:51Z
my coding skill is a facade ryo
Avatar
symlinks will fuck up your day
Avatar
dont be rude to urself chiller
Avatar
ChillerDragon BOT 2023-05-12 12:08:26Z
will i get in trouble with heinrich for being rude?
Avatar
nvm i'm silly
Avatar
i mistook one of these ki-o ones for one of urs
Avatar
Avatar
Learath2
If you want to expose fs to your user, you need to make your api forbid these things
I'd not allow any Io directly
Avatar
ChillerDragon BOT 2023-05-12 12:08:53Z
anyways heinrich here is what i have what u said sounds like work i will leave it here https://github.com/heinrich5991/libtw2/compare/master...ChillerDragon:libtw2:pr_add_ws_log
Some Teeworlds stuff in Rust. Contribute to heinrich5991/libtw2 development by creating an account on GitHub.
12:09
yo @heinrich5991 you got motivation to help me debug https://github.com/heinrich5991/libtw2/pull/78 ?
Generated using cd gamenet/generate python3 serialize.py --version 0.7 raw/teeworlds-0.7.5.py > spec/teeworlds-0.7.5.json
12:10
it doesnt show up in the dissector somehow ;_;
Avatar
ChillerDragon: you only need to do this: https://docs.rs/log/latest/log/#implementing-a-logger
A lightweight logging facade.
12:10
you'll learn a bit about rust 😉
Avatar
ChillerDragon BOT 2023-05-12 12:10:27Z
i rust pro no need to learn
Avatar
Avatar
Chairn
we would lose thematic games doing so, but we can maybe split them in software and allow a lot more option directly in game (like a split game icons option)
inkscape allows you to export in batches
Avatar
i would also make dbg_log a safe wrapper, somehow
Avatar
ChillerDragon BOT 2023-05-12 12:11:25Z
@heinrich5991 i dislike learning i am a result driven developer i only try to unserstand or learn something if I REALLY have to. otherwise its try and error until i get my gaming moment results
Avatar
I see
Avatar
@Patiga do u still use texture arrays for tee rendering? That's a part where I'd say it's more complex, and I'd love to see the performance cost of updating the array ^^
Avatar
E.g. downloaded skins
Avatar
ChillerDragon BOT 2023-05-12 12:12:14Z
ye the link i sent is totally scuffed xd
Avatar
yea… unfortunately it changes the message I send to IRC
Avatar
but irc should have no problems tho
12:13
hmm now i wonder
Avatar
ChillerDragon BOT 2023-05-12 12:13:31Z
so wen i compile the dissector shouldnt it also compile gamenet/*/src/msg/connless.rs ?
Avatar
alacritty highlights the link correctly for me
12:13
no <> in the url
Avatar
Avatar
ChillerDragon
so wen i compile the dissector shouldnt it also compile gamenet/*/src/msg/connless.rs ?
that's not where the dissector gets its data from
12:14
it gets it from the json
Avatar
Avatar
Ravie
yeah?
read log !! it's about deleting images atlas and splitting it into n files with one doodle per file
Avatar
ChillerDragon BOT 2023-05-12 12:15:29Z
yes but i generated the json too
Avatar
Avatar
Chairn
read log !! it's about deleting images atlas and splitting it into n files with one doodle per file
I'd say we should put it into a zip file then
12:16
so it can still be shared as a whole
Avatar
Avatar
Chairn
read log !! it's about deleting images atlas and splitting it into n files with one doodle per file
so like splitting game.png into gun.png, bullet.png, grenade.png, hook.png... ?
Avatar
Avatar
heinrich5991
symlinks will fuck up your day
refuse to follow any symlinks 😄
Avatar
symlinks are a security hazard
Avatar
Avatar
Learath2
refuse to follow any symlinks 😄
/home/user/linktoprocself/mem
Avatar
Avatar
Jupstar ✪
Tbh just stop using texture atlasses all along
@Ravie start from here
Avatar
can you ask the linux kernel not to follow this?
Avatar
eeeh idk if linux has a way to avoid TOCTOU there but you can stat it first to see if any path component is a symlink
12:18
but I guess then hardlinks fuck up your day
12:19
(though I think in this case the person who writes the potentially malicious code has access to the underlying system, so no need to worry about symlinks if you don't allow them to create them)
Avatar
can't hardlink directories
Avatar
How does java prevent it?
Avatar
Avatar
Jupstar ✪
How does java prevent it?
it doesn't
Avatar
Mh ok
12:20
Why does Linux offer it at all xd
Avatar
probably useful for crashdumps or so
Avatar
Avatar
Jupstar ✪
Why does Linux offer it at all xd
As said before, if you can access proc mem self you can also just use pointers
Avatar
or any kind of meta functionality
Avatar
Avatar
Learath2
As said before, if you can access proc mem self you can also just use pointers
Yeah but java is meant to run in a VM for a reason xD
Avatar
@Learath2 assuming no symlinks, how do you detect whether the file being opened is something like /proc/self/mem?
Avatar
Oh, actually why not run it in a jail?
Avatar
Avatar
Jupstar ✪
Yeah but java is meant to run in a VM for a reason xD
you can also call native code in java
Avatar
Avatar
Ravie
so like splitting game.png into gun.png, bullet.png, grenade.png, hook.png... ?
exactly
Avatar
Avatar
heinrich5991
you can also call native code in java
Yeah but that's easy to prevent
Avatar
u can also call java code from rust
Avatar
I'd say
Avatar
Avatar
heinrich5991
@Learath2 assuming no symlinks, how do you detect whether the file being opened is something like /proc/self/mem?
I can think of one silly way, but it's just a thought experiment. Just generate a pattern in memory at runtime, then scan whatever you opened for it
Avatar
Avatar
Learath2
I can think of one silly way, but it's just a thought experiment. Just generate a pattern in memory at runtime, then scan whatever you opened for it
heh, nice 😄
Avatar
Avatar
Jupstar ✪
@Patiga do u still use texture arrays for tee rendering? That's a part where I'd say it's more complex, and I'd love to see the performance cost of updating the array ^^
yup still on it :D
Avatar
i read recently valve tracked memory access at places where it was never meant to access to detect cheats
Avatar
Avatar
Chairn
exactly
but why tho? it would break all existing skins and make new ones an even bigger pain to create
Avatar
Avatar
Ravie
but why tho? it would break all existing skins and make new ones an even bigger pain to create
script to port
12:23
since skins are structured its easy
12:24
but also if you make a gameskin then you have to hope that people install all your files and not turn it into some disgusting mix with parts from other ones
12:25
do u care what others do
Avatar
zip files:
Avatar
Xd
Avatar
Avatar
Ravie
but also if you make a gameskin then you have to hope that people install all your files and not turn it into some disgusting mix with parts from other ones
I think this could be handles by zip files
Avatar
but why limit
12:25
the idea is customization
Avatar
U remove Atlas to use zip
12:25
Lmao
Avatar
ah u mean for shipping
Avatar
Avatar
Jupstar ✪
U remove Atlas to use zip
this way we can name the parts and add/remove them without backcompat problems (edited)
Avatar
we all had the same idea but different ways of saying it
Avatar
backcompat again justatest
Avatar
FBI
Avatar
without future backcompat problems
Avatar
open up!
Avatar
XD
Avatar
it does make it a little more annoying to share skins though
12:26
it's no longer a single picture
12:26
like in #📬submit-skins
Avatar
make a vote
12:27
separated skins + more customizatio or single file skins and status quo
Avatar
i guess but at the same time, its muuuch easier to organize and add new items
Avatar
Avatar
Jupstar ✪
U remove Atlas to use zip
remove atlas so you can upload more textures in hopes of breaking older computers bigbrain
Avatar
(stating that old skins are not lost)
Avatar
Avatar
Learath2
remove atlas so you can upload more textures in hopes of breaking older computers bigbrain
the way
Avatar
let's be honest, "more customization" will just make people turn their game into an even bigger visual cacophony
Avatar
is it even more customization?
12:28
people can edit a skin file today
Avatar
u can mix parts easily in the client
Avatar
Avatar
heinrich5991
is it even more customization?
it is easier customization, not more
Avatar
yea
Avatar
Avatar
Ryozuki
u can mix parts easily in the client
ah, that's a different thing you're asking for though
Avatar
Avatar
Ryozuki
u can mix parts easily in the client
i think thats what ravie is arguing against
Avatar
we don't need to change the file format for this
Avatar
yeah but why not
Avatar
Avatar
Ryozuki
yeah but why not
"why not" is not a reason to change something in my book
12:30
especially user-facing
Avatar
my book is the holy bible so it must be respected
Avatar
for things that are not user-facing, maybe…
Avatar
Yeah, change for changes sake isn't that great of an argument
Avatar
well i think its better organized
12:30
i forgot what other reasons are there
Avatar
It is better UX if people want to mix and match assets all the time
12:30
but I'm not sure that is a common demand even
Avatar
Avatar
Ravie
let's be honest, "more customization" will just make people turn their game into an even bigger visual cacophony
people already mix & match
Avatar
Avatar
Ewan
people already mix & match
mix & match
Avatar
if anything i just wanted to remove useless pngs
Avatar
kind of odd to limit others on how they wanna mix the skins
12:31
why do u care
Avatar
Avatar
Ravie
mix & match
deep
Avatar
Avatar
Ryozuki
kind of odd to limit others on how they wanna mix the skins
depends on whether this shows on other people's screens
Avatar
Avatar
Ryozuki
why do u care
hes a perfectionist
Avatar
I care about the fact that people opening the default installation of the game see something like tees
12:32
when joining a server
Avatar
walking hammers
Avatar
yeah but default will look the same
Avatar
well, it depends whether you want to propagate your visuals to other players
12:33
it sounds like you want to?
12:33
i.e. that everyone sees how you mixed your skins?
Avatar
by skins i was talking about hud elements
12:34
too
12:34
but yeah for skins that would happen
12:34
for example mixing laser from x and grenade fro my
12:34
from y
Avatar
Avatar
Ryozuki
kind of odd to limit others on how they wanna mix the skins
cause I think changing the look of the game in thematic batches is better than pure chaos, you can already do it if you edit the png's but the game isn't actively supporting and encouraging you to do it
Avatar
yea, I don't really care how people view the game oneself
Avatar
i was mainly talking about that
12:34
didnt think about skins
12:35
tees
Avatar
Avatar
heinrich5991
yea, I don't really care how people view the game oneself
people who make custom assets do, you don't make it with the purpose of being split for parts and mixed in weird ways that don't look good, it defeats the purpose of even making a set
Avatar
let's say "you do"?
12:40
that's fine, I think we should take that into account before changing anything, since you're obviously one of the people creating custom assets
Avatar
yeah I know it's a minority but you should still consider what the purpose of making custom assets really is
Avatar
i disagree with the statement but meh
12:41
its like saying i coded X in a way, and it has a permissive license, but i dislike you doing Y with it
Avatar
Avatar
Ravie
yeah I know it's a minority but you should still consider what the purpose of making custom assets really is
its for users to use them in whathever way they want
😃 1
12:42
in my opinion
Avatar
Avatar
Learath2
remove atlas so you can upload more textures in hopes of breaking older computers bigbrain
Btw we do that anyway internally ^^
Avatar
Avatar
Jupstar ✪
Btw we do that anyway internally ^^
Good good, now we need to find a way to up the vram usage
Avatar
Avatar
Learath2
Good good, now we need to find a way to up the vram usage
True. 1gb on my 16gb limit is not enough
12:44
That's less than two tabs of Firefox xd
Avatar
Avatar
Ryozuki
its for users to use them in whathever way they want
well for me personally if my work isn't gonna be used how I intended then there's no point in even making or sharing it
Avatar
we differ then
12:45
for me the amazing thing is how people find ways to use stuff in unexpected or never thought of ways, such as making a programming language
Avatar
also it's up to the creator how he licenses his work and what he wants users to do or not do with it
Avatar
insert alan turing quote here
Avatar
programming is much less subjective than art
Avatar
@Learath2 i just want to make one thing clear. I am not wasting memory, it has a purpose. GC languages that want to be fast kinda have to waste memory by design
12:48
so i'm new hardwarephil, because it offers more opportunities for better software design and more performance besides the performance increase by the generational improvement that comes anyway
12:48
isn't that awesome
Avatar
imho if more memory usage leads to more perf, its not that wasted memory is it
Avatar
that's awesome — as long as we don't push users away from their old hardware IMO
Avatar
Avatar
Ryozuki
imho if more memory usage leads to more perf, its not that wasted memory is it
depends on whether the increased perf has a positive effect or is just neutral
Avatar
Avatar
Ravie
programming is much less subjective than art
but the art here is used in a program 🤓
Avatar
for me personally, it probably doesn't matter, because I don't run the game on a lot of FPS. for others, it does matter because they want to have very high FPS
Avatar
anyway art benefits a lot from what i said too, derivative works and such
12:50
fanart
12:51
mix match xd
Avatar
Avatar
Jupstar ✪
so i'm new hardwarephil, because it offers more opportunities for better software design and more performance besides the performance increase by the generational improvement that comes anyway
hardwarephil is not a word sadly
Avatar
Avatar
heinrich5991
for me personally, it probably doesn't matter, because I don't run the game on a lot of FPS. for others, it does matter because they want to have very high FPS
but e.g. m1 is a good example, more energy efficient than your laptop, while still having more fps, more RAM etc. just that apple sucks
12:52
and their drivers xD
Avatar
Avatar
Ryozuki
hardwarephil is not a word sadly
the word would also have to be new_hardwarephil xd
12:52
bcs the new is important
Avatar
new_safe_hardwarephil
Avatar
Avatar
Ryozuki
anyway art benefits a lot from what i said too, derivative works and such
I have yet to see a "derivative work" that comes anywhere close to the original in our community justatest
justatest 1
Avatar
maybe we idealize teeworlds original art too much
12:53
cuz nostalgia or smth
12:53
its just a ball
Avatar
Avatar
Ravie
I have yet to see a "derivative work" that comes anywhere close to the original in our community justatest
most tee skins are derivative works of the original tee
Avatar
Avatar
Ryozuki
maybe we idealize teeworlds original art too much
I don't mean just original teeworlds art, I often see people mixing skins from Miper, Whis or Demix and it always looks terrible
Avatar
well its hard to please u, but i understand, just like i find windows terrible
12:56
@Learath2 r u still interested in https://github.com/ddnet/ddnet/pull/2754
Isn't finished yet but it'd be nice if you could take a look before I spend more time on it. Fixes #2748
12:57
Previously you could partially skip through teleporters: Line two teleporters up in a line, if you through both of them in a single tick, first, the game would teleport you to the first teleporter&...
12:57
the evening is lasting long xd
Avatar
Avatar
Ryozuki
well its hard to please u, but i understand, just like i find windows terrible
just speaking from the perspective of a huge perfectionist, and I can understand how much work other artists also put into making every pixel look just right, and then it gets twisted by some kid with gimp
Avatar
dont insult my gimp
12:58
BASEDDEPT
Avatar
I love gimp
poggers2 1
12:58
I use all the open source alternatives to adobe products gigachad
12:59
but u use windows?
12:59
frozen
Avatar
yes but not 11
12:59
when they discontinue win10 I go the linux waysaddo
Avatar
Avatar
Ryozuki
@Learath2 r u still interested in https://github.com/ddnet/ddnet/pull/2754
I'm not sure. I don't like how storage works at all. I have a feeling this will break some setups because of how we find data directories
Avatar
i forgot, does realloc zero memory?
Avatar
every sewcond windows is unusable
Avatar
Avatar
Ravie
just speaking from the perspective of a huge perfectionist, and I can understand how much work other artists also put into making every pixel look just right, and then it gets twisted by some kid with gimp
Glow skins lets go
Avatar
even more unusable than it already is xd
Avatar
Avatar
Ryozuki
i forgot, does realloc zero memory?
No
13:01
i guess i need to get memzero in too
Avatar
ChillerDragon BOT 2023-05-12 13:01:10Z
true designers use adobeOS over windows
Avatar
wait libc has memzero?
Avatar
memset(a, 0, sizeof(a))
☝️ 1
Avatar
note the funny parameter order
Avatar
note that it "has" to use int as parameter
13:02
even tho we talk about bytes
Avatar
Avatar
heinrich5991
memset(a, 0, sizeof(a))
(dst, src, dst_size) isn't it like this for all mem functions?
Avatar
Avatar
Learath2
(dst, src, dst_size) isn't it like this for all mem functions?
I'd have thought it's the src_size
Avatar
why are memory functions in string.h?
13:03
xd
13:03
anyway the header doesnt matter cuz im on llvm ir
Avatar
Avatar
Ryozuki
why are memory functions in string.h?
Shhhhhh
Avatar
because strings are just arrays of bytes
13:03
mem* functions operate on strings that are not zero-terminated
Avatar
Avatar
Ryozuki
anyway the header doesnt matter cuz im on llvm ir
Doesn't llvm have a way to set some memory without calling into libc?
Avatar
str* functions operate on strings that are zero-terminated
Avatar
Avatar
Learath2
Doesn't llvm have a way to set some memory without calling into libc?
to set memory allocated by malloc?
13:04
maybe there is a intrinsic
Avatar
Memory allocated by malloc isn't any different to any other memory
13:05
oh pog
Avatar
Perfect
Avatar
@Ryozuki name ur wrapper crealloc
Avatar
its ok
13:06
just need to get my open addressed linear probing hashmap done
Avatar
recalloc
13:06
sounds funny too
Avatar
i recall freeing this memory
13:06
said every c dev
Avatar
but i'll do it again just to be safe
13:09
Avatar
declare void @llvm.memset.p0.i64(ptr <dest>, i8 <val>, i64 <len>, i1 <isvolatile>)
13:09
seeing this signature reminded me
13:09
why memset accepts a int (32 bits)
Avatar
free(malloc(0)); // you are free now, c is freedom
Avatar
and not a char
Avatar
it does? >_>
Avatar
#include <string.h> void *memset(void *s, int c, size_t n);
Avatar
yea why thoe
13:11
share with the class
13:11
i thought it was char
Avatar
idk thats why am askin
Avatar
Avatar
Ryozuki
why memset accepts a int (32 bits)
i thought it was a statement lol
13:11
mayeb just for filling a pattern
Avatar
Avatar
Ryozuki
and not a char
not unsigned char u meant xd
13:11
i forget about C char stuff
Avatar
It couldn't be a char it would be a unsigned char
Avatar
xd
Avatar
correct but signedness is not the question here
Avatar
there are many questions to which there aren't answers
Avatar
it seems char literals are actually ints in plain C
Avatar
@Ryozuki what's worse, a C program that generates rust code or a rust program that generates C code?
Avatar
maybe saves a cast
Avatar
Avatar
Ravie
@Ryozuki what's worse, a C program that generates rust code or a rust program that generates C code?
rust program that generates c
13:14
cuz the rust program is safe (if no unsafe)
Avatar
"memset predates (by quite a bit) the addition of function prototypes to C. Without a prototype, you can't pass a char to a function -- when/if you try, it'll be promoted to int when you pass it, and what the function receives is an int."
👍 1
Avatar
it may also be a speed thing. sometimes smaller data is slower to access
13:14
eg why some bools used to also be ints
13:14
despite only needing 1 bit
Avatar
Avatar
Ryozuki
cuz the rust program is safe (if no unsafe)
but what about the program that it generated
Avatar
i think it depends man
Avatar
"prototypes were added during the C89 standardization. Before that, there were only function declarations, which specified the return type, but not the number or type(s) of parameter(s). "
13:15
ez
Avatar
a rust program that generates c could realistically describe any of these new programming languages
13:16
x new lang is like zig in the fact that it makes c, but it's written in rust
13:16
could happen any second...
Avatar
Avatar
Jupstar ✪
"prototypes were added during the C89 standardization. Before that, there were only function declarations, which specified the return type, but not the number or type(s) of parameter(s). "
What are the quotes for? is that GiPiTed?
Avatar
Avatar
zogtib
What are the quotes for? is that GiPiTed?
i teach ryo some awesomeness of c
Avatar
Avatar
Ewan
it may also be a speed thing. sometimes smaller data is slower to access
idk
Avatar
by copying stackoverflow answers
Avatar
i think you google it xd
Avatar
the thing is in llvm ir, you can have a data type of arbitrary bits
13:17
and llvm can use that to optimize better
13:17
i6 is valid
Avatar
llvm also have infinite registers
Avatar
bit packing is done under the hood
Avatar
its the perfect machine
13:17
xd
Avatar
std bitset is similar
13:17
a non 8*x bitfield
Avatar
Avatar
Ryozuki
and llvm can use that to optimize better
does it actually do that or do the non-register widths perform worse?
Avatar
im sure they perform worse usually
13:18
but it can make optimizations to non 8*x size ints that it couldn't to 8*x ints because they're already 'optimized'... (edited)
Avatar
Avatar
Ewan
im sure they perform worse usually
bitset performs worse or the inifinite registers?
Avatar
Avatar
heinrich5991
does it actually do that or do the non-register widths perform worse?
i would say it probs treats the underlying data as register widths, but it can make assumptions about the contents (?) and do optimizatiosn thanks to that
13:19
but dont quote on me
13:19
i dont know for sure
Avatar
Avatar
Jupstar ✪
bitset performs worse or the inifinite registers?
i6
Avatar
ah
13:21
here ryo more c awesomeness struct whatever { char a:3; char b:4; char c:1; };
Avatar
like im sure in an application where you're only using 6 bits, using an i8 would still be faster but i6 would be the better candidate because under the hood bit packing can be done to reduce memory footprint
Avatar
Avatar
Jupstar ✪
here ryo more c awesomeness struct whatever { char a:3; char b:4; char c:1; };
ye i know xd
Avatar
but i'm not sure because then pointers become impossible
Avatar
Avatar
Ewan
like im sure in an application where you're only using 6 bits, using an i8 would still be faster but i6 would be the better candidate because under the hood bit packing can be done to reduce memory footprint
i4 is used a lot in machine learning iirc
Avatar
machine learning has gpu usually
13:22
idk how those work too well
13:23
magic devices
Avatar
well llvm targets gpus too
13:23
i have cpu bound brain
Avatar
Avatar
Ewan
like im sure in an application where you're only using 6 bits, using an i8 would still be faster but i6 would be the better candidate because under the hood bit packing can be done to reduce memory footprint
i wouldn't count on it xd
Avatar
i can't see how i6 would be faster even theoretically (edited)
Avatar
Avatar
Ewan
i can't see how i6 would be faster even theoretically (edited)
well theoretically it surely can bcs of the memory footprint, but practically u are probably right in almost all cases
13:26
but somewhere someone finds one case where its not the case also depends if u mean that it uses less memory in total
13:26
else ofc not xd
Avatar
alignment is the thing here
13:26
we are speaking in bits
Avatar
yeah thats the question did u mean packing multiple data efficiently
13:27
or only a single i6
Avatar
then hard to say, probably its slower, but maybe there is some edge case
Avatar
single wouldn’t really make a different usually because it would probably just be given those extra 2 bits
13:27
cuz you cant pack the next data
Avatar
similar to if loading a zip and uncompress it might be faster than loading the whole file as is
Avatar
Avatar
Ewan
single wouldn’t really make a different usually because it would probably just be given those extra 2 bits
but the calculations with it would be a problem
Avatar
in practice accessing a non-multiple of 8 piece of data is slower because the cpu will have to first read that data then derive from it the relevant bits
Avatar
but that mostly happens on the cpu
13:29
with registers
Avatar
Avatar
Ryozuki
idk thats why am askin
Ancient signature, probably from back before c89 even, so it'd be promoted to int by default
Avatar
anyway before this leads to useless discussions i dunno, but would be interested with some benchmarks for some weird edge cases i cant think of rn
Avatar
Fwiw "char" literals are just ints aswell for the same ancient reasons
Avatar
in C (edited)
13:30
not in C++
Avatar
int is_cxx = sizeof(char) == sizeof('C');
Avatar
sizeof (char) is defined to be 1 anyway
Avatar
i understand unsigned char is akin to "bytes" in sane languages signed char for the numeric type, and char?
Avatar
So might aswell check sizeof 'c' == 1
Avatar
char for text? xd
Avatar
char is randomly signed or unsigned xdd they roll some dices
Avatar
Avatar
Ryozuki
i understand unsigned char is akin to "bytes" in sane languages signed char for the numeric type, and char?
Eeeeeeeeeh
Avatar
bytes being u8
Avatar
arm got unsigned x86 got signed
Avatar
&[u8] rusty bytes
Avatar
unsigned char is for bytes. char is for text. Try not to think too much of how it's handled internally 😄
Avatar
char8_t is for utf8 (edited)
Avatar
i love my &str
Avatar
xd
Avatar
char is neither the same as signed char nor unsigned char
ohno 3
Avatar
char8_t doesnt ensure its valid utf8 tho
13:35
the epic thing in rust is str is valid utf8 always
13:35
or ub
Avatar
Avatar
Jupstar ✪
char is randomly signed or unsigned xdd they roll some dices
plus this fact
Avatar
utf8 supremacy
Avatar
in a perfect world, there wouldnt be any utf
Avatar
plus char/signed char/unsigned char could be non 8-bits
Avatar
was there ever a CPU without 8 bits per byte?
13:37
probably
13:37
back in the ages
13:37
194x
Avatar
i remember hearing such a thing
Avatar
why does memset return the passed pointer?
13:37
should i use the new pointer
Avatar
it's the same
Avatar
Avatar
Jupstar ✪
was there ever a CPU without 8 bits per byte?
The issue isn't the cpu, I think the issue was how the data was to be encoded in transmission
Avatar
whats wchar_t
ohno 3
Avatar
wide char
13:38
2 byte
13:38
for non ascii
Avatar
The wchar_t type is an implementation-defined wide character type. In the Microsoft compiler, it represents a 16-bit wide character used to store Unicode encoded as UTF-16LE, the native character type on Windows operating systems
13:38
oh god
Avatar
Avatar
Ryozuki
whats wchar_t
xD
Avatar
oh my god have u never messed with this
Avatar
i know windows api loves it
Avatar
Avatar
Ryozuki
why does memset return the passed pointer?
maybe for chaining or something, like char *p = memset(alloc(...), ...)
Avatar
try fucking specifying DoShitW on every win32 function ever
Avatar
and thats why i never touched it
13:38
painful
Avatar
Just use utf8
Avatar
Avatar
Robyt3
maybe for chaining or something, like char *p = memset(alloc(...), ...)
makes sense
Avatar
New winapi can mostly handle it too
Avatar
if we only wanted to support Windows 10 and newer then we could also just use UTF-8 with the Windows API
Avatar
Avatar
Robyt3
if we only wanted to support Windows 10 and newer then we could also just use UTF-8 with the Windows API
LETS GO
Avatar
without converting between char and wchar_t for every function
Avatar
this is how they want you to do it #ifndef UNICODE #define UNICODE #endif DoSomething(); // is a macro; resolves to DoSomethingW, a function #ifdef UNICODE #undef UNICODE #endif DoSomething(); // is a macro; resolves to DoSomethingA, a function (edited)
Avatar
Avatar
Robyt3
if we only wanted to support Windows 10 and newer then we could also just use UTF-8 with the Windows API
the conversion happens on the other side then, no performance on
Avatar
wmemset ftw
13:40
wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n); (edited)
Avatar
Avatar
Ewan
this is how they want you to do it #ifndef UNICODE #define UNICODE #endif DoSomething(); // is a macro; resolves to DoSomethingW, a function #ifdef UNICODE #undef UNICODE #endif DoSomething(); // is a macro; resolves to DoSomethingA, a function (edited)
you can also (and maybe should) just call DoSomethingW directly
Avatar
memset w/ sizeof type * count
Avatar
Avatar
heinrich5991
you can also (and maybe should) just call DoSomethingW directly
depends
Avatar
This is one thing I like about newer languages. Proper unicode support
Avatar
yeah, we always call the W variant explicity even though we define UNICODE and _UNICODE
Avatar
Avatar
Learath2
This is one thing I like about newer languages. Proper unicode support
yep yep
13:41
@Learath2 but some chose to go the evil way and use utf 16
Avatar
Avatar
Robyt3
yeah, we always call the W variant explicity even though we define UNICODE and _UNICODE
yeah this is good the only time this'll bite you in the ass is if using a system that somehow doesn't support unicode (old)
Avatar
Windows doesn't even use utf16 technically. They use UCS2
Avatar
Avatar
Ryozuki
wchar_t *wmemset(wchar_t *wcs, wchar_t wc, size_t n); (edited)
u know whats funny? str functions accept the number of characters istead of the buff size so wchar_t a[10]; wsprintf(a, std::size(a), L"test %s", L"test"); would be correct while with sizeof(a) would be wrong
Avatar
Avatar
Ewan
yeah this is good the only time this'll bite you in the ass is if using a system that somehow doesn't support unicode (old)
lol, that's win98?
13:42
note somehow and (old)
Avatar
Avatar
Learath2
Windows doesn't even use utf16 technically. They use UCS2
no, not UCS-2. they use possible-invalid UTF-16
Avatar
When migrating to utf16 they left some bizarre quirks that make using winapi pain
Avatar
i blame c++20
13:43
why didnt they take the chance with char8_t and extend the std::filesystem to allow utf8 characters
13:43
and what happens under the hood is not our problem
Avatar
utf8_t
13:44
c# calls it Rune
Avatar
https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/ I probably sent this blog post a while back but until like 2018 the console was extremely bizarre
In this post, we’ll discuss the improvements we’ve been making to the Windows Console’s internal text buffer, enabling it to better store and handle Unicode and UTF-8 text. Posts in the Windows Command-Line series: This list will be updated as more posts are published: Command-Line Backgrounder The Evolution of the Windows Command-Line Inside th...
Avatar
Represents a Unicode scalar value ([ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive).
Avatar
ChillerDragon BOT 2023-05-12 13:45:16Z
@heinrich5991 sori for all the oopsie daisys you probably could have done it twice in the time you spent reviewing my mess
Avatar
std::filesystem is the worst
13:45
because it works pretty much only in theoreticals
13:45
that's probably the one thing i genuinely prefer doing the C way
Avatar
what r u even working for? r u some secret microsoft dev? xd
Avatar
I never used std::filesystem. What's wrong with it?
Avatar
it's just strings
Avatar
iob_new creates a new I/O batch with enough space allocated for hint_entries entries (buffers or files). This is purely a performance hint, if you are unsure just pass 1.
Avatar
@Ewan are u playing ddnet?
13:46
or just chilln here
Avatar
ChillerDragon BOT 2023-05-12 13:47:29Z
everyone with less than 1k ddnet points should be read only in this channel
Avatar
xDD
Avatar
ChillerDragon BOT 2023-05-12 13:47:51Z
i dont wanna hear this rando robyt talk about a game he doesnt play
Avatar
im trying to play more lately, but i got 7k points anyway
13:48
lmao
Avatar
Ooh, I hadn't seen this before
Avatar
robyt is our saviour
Avatar
ChillerDragon BOT 2023-05-12 13:48:29Z
!rob its a joke ofc we all love you <3
13:48
!robstr
13:48
!robster
13:48
omg xdf
13:48
!roby
13:48
fuck
Avatar
bot is dead
Avatar
ChillerDragon BOT 2023-05-12 13:48:48Z
how to ping roby
13:48
!ping
Avatar
chillerbot4 BOT 2023-05-12 13:48:51Z
pong
Avatar
good question
13:48
!robstar
Avatar
!bugfixer
Avatar
!roberster
Avatar
weeb pfp = good dev
13:49
@Jupstar ✪ get a vulkan waifu pfp
Avatar
ChillerDragon BOT 2023-05-12 13:49:41Z
!robster
13:49
WTRF
Avatar
u dont even know ur bot
Avatar
Avatar
Ryozuki
@Jupstar ✪ get a vulkan waifu pfp
give me midjourney access
13:49
and i generate one
13:49
!robster
Avatar
ok wait
Avatar
!jup
Avatar
chillerbot4 BOT 2023-05-12 13:50:05Z
@Jupstar ✪
Avatar
ChillerDragon BOT 2023-05-12 13:50:08Z
irc bot for ddnet#developer. Contribute to ChillerDragon/ddnet-ircbot development by creating an account on GitHub.
13:50
it says here ffs
Avatar
stable diffusion tho
Avatar
chiller forgot to reload?
Avatar
ChillerDragon BOT 2023-05-12 13:50:21Z
maybe
13:50
lemme rebuild docker image
13:50
docker moment
Avatar
Avatar
Ryozuki
stable diffusion tho
sadly its too bad :/
Avatar
Avatar
kio
Use POST and pass Json params (edited)
we don't have anything in the source code to build JSON, we always build it manually using str_format
Avatar
it gets better and beter
13:50
but still too bad
Avatar
Avatar
heinrich5991
we don't have anything in the source code to build JSON, we always build it manually using str_format
oh jesus really?
13:51
they should use the lib then
Avatar
Avatar
heinrich5991
we don't have anything in the source code to build JSON, we always build it manually using str_format
I still need to port the CJsonWriter from upstream
Avatar
@kio other than that, there's code in src/engine/server/register.cpp that uses HTTP to post some json. search that file for Json
Avatar
Yeah, I wanted to do a json builder too for a while now
Avatar
Avatar
heinrich5991
we don't have anything in the source code to build JSON, we always build it manually using str_format
yes but the problem was do it with post
Avatar
Avatar
heinrich5991
@kio other than that, there's code in src/engine/server/register.cpp that uses HTTP to post some json. search that file for Json
oh nice
13:51
13:51
i did this work around ahah
Avatar
ChillerDragon BOT 2023-05-12 13:52:01Z
!rob i added upstream json writer in #5660
Avatar
chillerbot BOT 2023-05-12 13:52:02Z
I started working on this a while ago and it is still far from being finished. Just wanted to share that I am working on this and get some feedback if it even has a chance to be merged when finishe...
13:52
@Robyt3
Avatar
ChillerDragon BOT 2023-05-12 13:52:04Z
EZ
Avatar
what does the json writer do?
13:52
does it use rtti or what
Avatar
it probably just formats
13:52
using variant union thing
Avatar
oh shit nvm, it requires python 3.10 but i removed it on gentoo
Avatar
ChillerDragon BOT 2023-05-12 13:53:00Z
it does system("jq %s > %s")
Avatar
ChillerDragon: I'm not sure if the constants SERVERINFO_LEVEL_MIN/SERVERINFO_LEVEL_MAX add something. I'd either remove them or make them into an enum that names the variants, I think
13:53
ChillerDragon: after this is resolved (e.g. by discussing it), could you squash your PR?
Avatar
Avatar
Ryozuki
oh shit nvm, it requires python 3.10 but i removed it on gentoo
u can use it on huggingface for free
Avatar
ChillerDragon: nice. if you have the time, extract just the json writer in another PR already, so we can merge it separately
Avatar
ChillerDragon BOT 2023-05-12 13:53:41Z
constants is the first thing i found to name ranges
Avatar
its sadly even faster than my PC XD
Avatar
Avatar
ChillerDragon
constants is the first thing i found to name ranges
why do you want a name though? it's 0-2 and cannot be changed
Avatar
ChillerDragon BOT 2023-05-12 13:54:16Z
idk i thought its good style
13:54
but the info got lost in the rendered json anyways so we can also get rid of it
Avatar
then let's get rid of it
Avatar
ChillerDragon BOT 2023-05-12 13:54:50Z
oke sir
13:54
we need to embrace this
13:54
The byte string functions perform operations on strings (byte arrays) that are not necessarily null-terminated. See the individual man pages for descriptions of each function.
Avatar
i wouldn't call that intrinsic, it's still target dependent. Real intrinsic would be 0 page on DRAM directly
Avatar
ChillerDragon BOT 2023-05-12 13:55:18Z
squash into one commit with generated code?
Avatar
Avatar
Chairn
i wouldn't call that intrinsic, it's still target dependent. Real intrinsic would be 0 page on DRAM directly
its a llvm intrinsic, it handles the target dependent thing for u
Avatar
also known as mem*
Avatar
Does anyone know if it's possible to edit the data of a demo ?
Avatar
Avatar
Chairn
i wouldn't call that intrinsic, it's still target dependent. Real intrinsic would be 0 page on DRAM directly
it also allows u to mark volatile
Avatar
ChillerDragon BOT 2023-05-12 13:56:05Z
it took me so long to get the constants working :( but ye i see ur point
13:56
waste of time
Avatar
you can also put it into an enum, if you want names, ChillerDragon
Avatar
Avatar
Jupstar ✪
char is randomly signed or unsigned xdd they roll some dices
biggest troll ever, already got beaten by that several times
Avatar
ChillerDragon BOT 2023-05-12 13:56:56Z
its also not obvious when looking at the json where the number comes from tho right?
Avatar
Avatar
Jupstar ✪
was there ever a CPU without 8 bits per byte?
first intel CPU were 4 bits iirc
Avatar
Avatar
Chairn
biggest troll ever, already got beaten by that several times
it's really good fun. sometimes you have to say < 0 and sometimes you have to say > 127 to check for ascii
Avatar
Avatar
Pipou
Does anyone know if it's possible to edit the data of a demo ?
I have a problem where I see teams that I don't want to see in the rendered video
Avatar
ChillerDragon: the JSON tries to be machine readable. so it will resolve any constants
Avatar
btw, lots of circuits are also 1 bit technically but very fast
Avatar
ChillerDragon BOT 2023-05-12 13:57:29Z
yea
13:57
so lets get rid of it
13:57
otherwise it has no readibility improvements anyways
13:57
nobody looks into loader.py
Avatar
okay 🙂
13:58
The memfrob() function encrypts the first n bytes of the memory area s by exclusive-ORing each character with the number 42. The effect can be reversed by using memfrob() on the encrypted memory area.
>
Note that this function is not a proper encryption routine as the XOR constant is fixed, and is only suitable for hiding strings.
Avatar
Avatar
Pipou
Does anyone know if it's possible to edit the data of a demo ?
its not impossible but there isnt such tool. if u lucky replace the game tee skins with transparent skins (edited)
Avatar
how did this function get into libc?
Avatar
Avatar
heinrich5991
The memfrob() function encrypts the first n bytes of the memory area s by exclusive-ORing each character with the number 42. The effect can be reversed by using memfrob() on the encrypted memory area.
>
Note that this function is not a proper encryption routine as the XOR constant is fixed, and is only suitable for hiding strings.
no way xD
Avatar
ChillerDragon BOT 2023-05-12 13:59:25Z
@Robyt3 i wanted to do that at first to make step by step stuff easier and less git conflicty but thought nobody would merge a unused upstream feature
Avatar
Avatar
heinrich5991
The memfrob() function encrypts the first n bytes of the memory area s by exclusive-ORing each character with the number 42. The effect can be reversed by using memfrob() on the encrypted memory area.
>
Note that this function is not a proper encryption routine as the XOR constant is fixed, and is only suitable for hiding strings.
This is not standard C, right??
Avatar
Avatar
Jupstar ✪
its not impossible but there isnt such tool. if u lucky replace the game tee skins with transparent skins (edited)
That sounds like a clever solution, will do (can't get rid of other players' particles but it should be good enough already)
Avatar
Avatar
Pipou
I have a problem where I see teams that I don't want to see in the rendered video
does /specteam works in demo?
Avatar
Avatar
Learath2
This is not standard C, right??
no, just a libc function
14:00
glibc, probably
Avatar
Seems like gnu c yeah
Avatar
Avatar
Pipou
That sounds like a clever solution, will do (can't get rid of other players' particles but it should be good enough already)
maybe create an issue about this as new idea/feature
Avatar
Avatar
Chairn
does /specteam works in demo?
Nope, I can't even see the team
14:01
Both are currently in team
Avatar
yeah
14:02
the network code is weird
14:02
it only sometimes sends the information
Avatar
Avatar
heinrich5991
The memfrob() function encrypts the first n bytes of the memory area s by exclusive-ORing each character with the number 42. The effect can be reversed by using memfrob() on the encrypted memory area.
>
Note that this function is not a proper encryption routine as the XOR constant is fixed, and is only suitable for hiding strings.
xd
Avatar
ChillerDragon BOT 2023-05-12 14:02:45Z
did someone say network code?
14:02
i became actual tw netcode enjoyer
Avatar
no
14:03
i think its overcomplex
14:03
demo code is all over place
Avatar
ChillerDragon BOT 2023-05-12 14:03:18Z
ye xd
Avatar
ChillerDragon: wait. you learned the netcode without any immediate benefit. I thought you did not like learning 🤔
Avatar
ChillerDragon BOT 2023-05-12 14:05:42Z
i had to learn tw netcode which was a very long and frustrating process to get my desired outcome of uniting all tw playerbases 0.6 and 0.7 and be able to play ctf again with a client that allows me to control the mouse
Avatar
Avatar
ChillerDragon
i had to learn tw netcode which was a very long and frustrating process to get my desired outcome of uniting all tw playerbases 0.6 and 0.7 and be able to play ctf again with a client that allows me to control the mouse
I think it might have been easier to fix whatever mouse trouble you have with ddnet
Avatar
ChillerDragon BOT 2023-05-12 14:08:18Z
teeworlds*
14:08
i need ddnet client to work on 0.7 to play ctf with OG ctf players
14:08
because teeworlds client is weird
Avatar
does your server not support both 0.6 and 0.7?
Avatar
ChillerDragon BOT 2023-05-12 14:09:03Z
some of my servers yes
14:09
but no ctf server
Avatar
I see
Avatar
ChillerDragon BOT 2023-05-12 14:09:22Z
especially not vanilla ctf servers
14:09
and also i think it makes a lot of sense to not split the game into ddnet and teeworlds
14:10
i dont wanna miss out on whats happening in 0.7 or switch clients
Avatar
Register SDL for cleanup before creating the kernel and client, so SDL is shutdown after kernel and client. Otherwise the client may crash when shutting down after SDL is already shutdown. Closes #6581.

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
0db2f62 fix nameplate related indicators opacity - edg-l 1e319fa fix opacity for jumps - edg-l ddf57c9 Merge #6580 - bors[bot]
Avatar
%3 = llvm.mlir.constant(296 : i64) : i64 %4 = llvm.mlir.null : !llvm.ptr %5 = llvm.call @realloc(%4, %3) : (!llvm.ptr, i64) -> !llvm.ptr %6 = llvm.mlir.constant(0 : i32) : i32 %7 = llvm.call @memset(%5, %6, %3) : (!llvm.ptr, i32, i64) -> !llvm.ptr ez (edited)
Avatar
3 people carrying ddnet gigachad
Avatar
82fb94a Shutdown SDL after kernel and client - Robyt3 d873095 Merge #6582 - bors[bot]
Avatar
@deen i think for https://github.com/ddnet/ddnet/issues/6450 we need you to enable smth in steam
16:27
im looking for something ez to do next xd
Avatar
I already did that 😄
16:33
(implement it)
Avatar
oh nice xd
Avatar
I usually use the github search is:issue sort:updated-desc is:open -label:needs-discussion -label:to-reproduce -label:incomplete -label:"3rd party" -label:discussion (with a bookmark) to find the issues to fix
Avatar
oh nice
16:35
issue fix speedrun xD
Avatar
Avatar
Ryozuki
@deen i think for https://github.com/ddnet/ddnet/issues/6450 we need you to enable smth in steam
But I think this issue is not solvable anyway, as I explained in the issue "You probably need to select each individual language that the game supports, so unsupported languages don't appear in the list. However this could mean that if a user has Steam configured with a language that's not supported by the Steam API, then the GetCurrentGameLanguage API might default to English, so we cannot use the Steam API to first determine the language, as this would override the user locale, which would have been more accurate. The user could also later change the language in the Steam game properties and would be confused, as this language is only applied once when the game is first started, but the language selection in the game properties is likely intended so that the language can be changed at any time."
Avatar
I can't find this setting in the steam settings
Avatar
Avatar
Robyt3
But I think this issue is not solvable anyway, as I explained in the issue "You probably need to select each individual language that the game supports, so unsupported languages don't appear in the list. However this could mean that if a user has Steam configured with a language that's not supported by the Steam API, then the GetCurrentGameLanguage API might default to English, so we cannot use the Steam API to first determine the language, as this would override the user locale, which would have been more accurate. The user could also later change the language in the Steam game properties and would be confused, as this language is only applied once when the game is first started, but the language selection in the game properties is likely intended so that the language can be changed at any time."
the latter part could be fixed by setting the language to "autoselected" instead of setting it to a concrete thing
Avatar
maybe we can just use the UI language instead of the configured game language
16:38
the docs say you usually want the game language and not the UI language, but I think it makes more sense here
16:38
because we don't change the language in the client later, after the game language is changed in the steam settings
Avatar
Avatar
Robyt3
because we don't change the language in the client later, after the game language is changed in the steam settings
but that could be fixed by marking the language as autoselected
16:39
also, the game language is the same as the UI language by default, I think
Avatar
yeah, game language just uses the UI language if it's not set specifically for that game
16:40
what is "autoselected" though?
16:40
is that a setting you can use?
Avatar
ye
16:40
basically like the nickname
16:41
if you don't set one explicitly, it's updated every time you change your steam nick
16:41
but if you set it explciitly, it'll no longer be updated
Avatar
First tee joins /team 1 and use /practice Second tee joins /team 1 and is stuck there because of practice Practice should probably act as if the team started
16:49
i dont understand this issue
16:49
First tee joins /team 1 and use /practice Second tee joins /team 1 and is stuck there because of practice
>
Practice should probably act as if the team started
16:49
what does it mean stuck
16:49
i tested it and i dont see anything wrong
16:53
big numbers
Avatar
Avatar
Ryozuki
First tee joins /team 1 and use /practice Second tee joins /team 1 and is stuck there because of practice
>
Practice should probably act as if the team started
I think this complains about the fact that it is currently possible to join a /practice team
16:54
because you can't leave a /practice team without dying
16:54
not sure if making /practice teams unjoinable is really the best way to solve this
Avatar
@heinrich5991 awaiting ur input https://github.com/ddnet/ddnet/issues/2762
Setup: 2 monitors, 1920x1080, 2560x1440. DDNet 14.6.2 (Steam version). $ i3 --version i3 version 4.18.2 (2020-07-26) © 2009 Michael Stapelberg and contributors When starting DDNet with fullscreen e...
Avatar
ryo tryhard mode
17:03
somebody has to do the dirty work
17:03
kekCapture
17:03
(joke i do nothing)
17:03
wh ocares about centos
17:03
close this
17:03
gigachad
17:03
right @Jupstar ✪
Avatar
tru
17:05
is this true
Avatar
i dont think it can cause such insane lags
17:05
but indeed its not the most efficient implementation
Avatar
It's kinda annoying when there's a tune zone and you don't know what it does. I think we could render the tune settings when using entities mode in a not too annoying way rather than ha...
17:06
can we render the tune zone config text in place?
17:06
xddd
Avatar
mhh sounds hard to do nicely
Avatar
also rly niche
Avatar
the question is where do you even render the text exactly? would be distracting if it keeps moving while the tee moves
Avatar
yeah^^
Avatar
close as wontfix?
17:10
xd
17:10
i vote+ 1
17:10
+1
17:10
god i cant type
Avatar
we can close 90% as wont fix xDDDD
17:11
i got a idea for a feature
17:11
but maybe its too ddnet centric
17:11
a tab to show info about ur name, since we can query the json api
17:11
points etc
Avatar
its common for trolls to constantly join and spam with multiple ips add a command that locks down the server without needed to set a password, for the given minutes maybe another approach is better
Avatar
Do any of you use MATLAB?
Avatar
Avatar
Learath2
Do any of you use MATLAB?
why do u ask if we use non-free propietary software
Avatar
Avatar
Ryozuki
why do u ask if we use non-free propietary software
Because we atleast have one academic here and academics love matlab
Avatar
only when I'm forced by university st(u|a)ff
Avatar
and there may be people using octave 😄
18:32
Anyway, any idea proprietary software enjoyers?
Avatar
ask chatgpt
👍 1
Avatar
actually not a bad idea
Avatar
its sad u cant take a academic course and not be bombarded by propietary non free software
18:34
public teachings ought to be free as in freedom
18:34
i had a teacher who was very into pushing this
18:34
he wanted to make my high school change all windows into linux
18:34
and replace all the programs
18:34
gigachad
18:35
he was nearing the retarement age too xd
18:35
retirement
Avatar
Avatar
Ryozuki
its sad u cant take a academic course and not be bombarded by propietary non free software
they are trying to upgrade the curriculum here but the professors are a bit resistant
18:36
circuit theory moved to python but they still use proprietary spice instead of ngspice
Avatar
@Learath2 if gov made a law to only use fsf licensed software
18:37
it would push and motivate to make better
Avatar
linear algebra is moving to python next year I think
Avatar
Avatar
Learath2
Anyway, any idea proprietary software enjoyers?
not sure if I parse correctly, are you trying to zip the two cell arrays together?
Avatar
Avatar
Patiga
not sure if I parse correctly, are you trying to zip the two cell arrays together?
Yes, I want to end up with one 2x2 cell array of 1x2 cell arrays
18:40
I think this control theory class will forever be in matlab tho. They use so many proprietary things, I can't imagine it existing without simulink and matlab
Avatar
https://stackoverflow.com/questions/26165932/how-do-i-zip-multiple-cell-arrays-together while I don't know enough matlab to understand the solution, this looks good
Avatar
Avatar
ChillerDragon
true designers use adobeOS over windows
i bet it crashes daily and has like a thousand memory leak issues
Avatar
Avatar
Patiga
https://stackoverflow.com/questions/26165932/how-do-i-zip-multiple-cell-arrays-together while I don't know enough matlab to understand the solution, this looks good
Someone on the matlab discord found me something better cellfun(@(x, y) {x, y}, n, d, 'UniformOutput', false)
Avatar
DkrTremos BOT 2023-05-12 20:12:22Z
sera all
Avatar
@Learath2 @Jupstar ✪ @heinrich5991 my heros i need help
Avatar
Avatar
kio
@Learath2 @Jupstar ✪ @heinrich5991 my heros i need help
dont ask to ask
21:33
crazy
Avatar
i need to share an object
21:33
no wait
Avatar
Avatar
Voxel
xd
so, let me explain better, I have my own class, and from there I want to manage everything, be able to hook, send messages in chat, move, jump, disconnect from the server, ... (these are random examples that came to my mind ) but I don't understand how to make my class globally shared in other classes or have access to other classes directly from mine, because I guess I can't reinstantiate a character or player or client object or whatever, I guess I need the object originally created to be able to access its data inside, so the question is: is there a way to share all objects to my class or my class to all objects?
Avatar
friend classes i suppose
Avatar
how it works
Avatar
in c++ you can access your friends privates 😏
21:58
or so I heard
21:58
oke but i never saw a similar thing in other languages
Avatar
it's in every oop language you can think of
Avatar
for example, this fucking m_pClient where can i find it without pass that from fucntion params
Avatar
Avatar
Learath2
it's in every oop language you can think of
have another name?
Avatar
it's called friend in every language I can think of
22:00
im nub
22:00
very nub
22:00
stop programming
22:00
lets learn latin
Avatar
Avatar
kio
for example, this fucking m_pClient where can i find it without pass that from fucntion params
You either pass it from parameters or you keep your own, that's how it works
22:02
client components e.g. each keep their own m_pClient
Avatar
@Learath2 so, if im in my sweety class and i wanna use m_pClient->m_Chat.AddLine(int ClientID, int Team, const char *pLine) without pass m_pClient by params of my function how can i do that
Avatar
Avatar
Learath2
You either pass it from parameters or you keep your own, that's how it works
what u mean "keep your own"
Avatar
Your class should be initialized by another class that already has a pointer to CGameClient, which it can pass to you in the constructor of your class, which you can store in your class
Avatar
ok this was my idea, but I wanted to put as many things as possible in the constructor, so where do you recommend me to instantiate my class?
22:05
gamecore, client or where
Avatar
What is your class even?
Avatar
game>client>kehub/
Avatar
It all depends on context. When should your class be created?
Avatar
God object troll
Avatar
and if then after instantiating it where I want and passing it what I want I want to call a method of my class from CChat::OnMessage or idk and then I still want to use the reference to my original object, how does it get to the CChat class? IT'S ALL SO CONFUSED HELP
Avatar
Then CChat needs a reference to your object through some means
22:08
Look there is no hidden magic or anything, if you want a pointer you need to get it there somehow, usually during initialization or for one offs usually in function parameters
Avatar
Avatar
Learath2
It all depends on context. When should your class be created?
right now I use it as a util that I create whenever I need it and call the method, but now I want to do it better to implement functions that remain in the background called in a loop to check something I don't know yet, for example if a player he is so close to you he writes him to leave in chat
Avatar
Avatar
Learath2
Then CChat needs a reference to your object through some means
Normally I would do this in the constructor of the class, but I never see anywhere an object created by passing it parameters, although I see Inits wrapped with parameters never passed...
Avatar
Avatar
kio
right now I use it as a util that I create whenever I need it and call the method, but now I want to do it better to implement functions that remain in the background called in a loop to check something I don't know yet, for example if a player he is so close to you he writes him to leave in chat
I think what you are looking for is kinda like a component, components already have hooks everywhere so you don't have to think so much about where to initialize/call stuff
Avatar
Avatar
kio
Normally I would do this in the constructor of the class, but I never see anywhere an object created by passing it parameters, although I see Inits wrapped with parameters never passed...
I know how things work, I've been programming for a long time, but CPP always manages to confuse me 😢
Avatar
Avatar
Learath2
I think what you are looking for is kinda like a component, components already have hooks everywhere so you don't have to think so much about where to initialize/call stuff
i saw this too but what should i do?
Avatar
Avatar
kio
Normally I would do this in the constructor of the class, but I never see anywhere an object created by passing it parameters, although I see Inits wrapped with parameters never passed...
Then do it in Init? It's heritage from the porting of teeworlds from C to C++.
Avatar
Avatar
kio
i saw this too but what should i do?
Make a class that inherits from CComponent, override one of the many fine hooks you can find in src/game/client.component.h to do your things, register your component with all the other components
Avatar
Avatar
Learath2
Make a class that inherits from CComponent, override one of the many fine hooks you can find in src/game/client.component.h to do your things, register your component with all the other components
I had done it initially, but since it inherits all methods like onRender and others, it seemed ugly to me
22:14
xd
Avatar
They are empty by default, you only have to override the ones you want to change
Avatar
I'll go practice alcoholism, have fun making what I suspect is a bot that we'll have to ban you for 👋
Avatar
so my class can be considered a component?
Avatar
Avatar
Learath2
I'll go practice alcoholism, have fun making what I suspect is a bot that we'll have to ban you for 👋
ahahaha no no my man
Avatar
Avatar
kio
so my class can be considered a component?
It can be one, I don't see why not. Even if it's not you don't seem to know how best to hook into our code so it's best you stick to a component where all that stuff is already thought about for you
Avatar
I want to make a serious client with nice graphics and some interesting features, but I want to fully understand the code
Avatar
"components" are loosely defined anyway, most anything can be a component
22:17
they usually are rendered, but that's not strictly necessary I guess
Avatar
Avatar
kio
I want to make a serious client with nice graphics and some interesting features, but I want to fully understand the code
today i managed to apply the ddrace function when you finished a map without going into it for kog servers
22:19
question, is it legit for you to convert bees that are not mine made with post to bees of mine with get because they are more convenient? haha
Avatar
Avatar
Learath2
I'll go practice alcoholism, have fun making what I suspect is a bot that we'll have to ban you for 👋
you look like a studied mind, don't drink, it hurts
Avatar
Avatar
kio
you look like a studied mind, don't drink, it hurts
The aim is to unstudy the mind Prayge
Avatar
if you're happy... haha (edited)
22:23
'Member access into incomplete type' beautiful
Avatar
@Learath2 why the fuck does everyone access m_pClient which is protected as they want while it tells me that I don't have permission to access the variable? >:
Avatar
They either access their own copy, (a lot of classes have m_pClient pointers of their own) or they are friends with the class they access it thru
Avatar
but what role do you have on this customer? how do you know all these things haha
22:36
by "their copy" what do you mean? shouldn't they be pointing the variable at something?
Avatar
I only spent a decade of my youth learning C++ and contributing to this codebase
Avatar
Avatar
Learath2
I only spent a decade of my youth learning C++ and contributing to this codebase
oh
22:37
very nice
22:37
a chad
Avatar
Avatar
kio
by "their copy" what do you mean? shouldn't they be pointing the variable at something?
Those are the classes that have a pointer to m_pClient, thus they can all access m_pClient as every class can access all their members
Avatar
so do you recommend me to make my own copy of m_pClient?
Avatar
Avatar
kio
a chad
No, no, no, very not recommended
Avatar
Avatar
Learath2
No, no, no, very not recommended
what? you are a giga chad man the most powerful man in the world
Avatar
Avatar
kio
so do you recommend me to make my own copy of m_pClient?
I recommend you just make a component, you are clearly lost, it's much easier with all the boilerplate
Avatar
Avatar
Learath2
I recommend you just make a component, you are clearly lost, it's much easier with all the boilerplate
eh eh the problem is that im retarded
Avatar
Doubtful, you did manage to get it compiling
Avatar
class KeHub : public CComponent{ public: m_pClient-> //error there (obv in 2 different files)
22:41
I saw I don't remember where a very long list of components, do you intend to register it there?
Avatar
i might be stupid but are you adding #include <path/to/class.h>?
Avatar
If you took a closer look at CComponent, you'll notice that while m_pClient is protected GameServer() isn't
Avatar
Avatar
Voxel
i might be stupid but are you adding #include <path/to/class.h>?
its different
Avatar
Avatar
Voxel
i might be stupid but are you adding #include <path/to/class.h>?
the problem I think is that the variable is protected
Avatar
GameClient() sorry, brain slow
22:43
Oh, that's not the issue at all
Avatar
Avatar
Learath2
GameClient() sorry, brain slow
in fact, I randomly tried to put GameClient as a friend of my class but it didn't work (I didn't quite understand how or when to use friend xd)
Avatar
Avatar
Learath2
Oh, that's not the issue at all
sad
Avatar
Inside your component you need to be including game/client/gameclient.h as the compiler says it doesn't know what a CGameClient is so it can't dereference it
Avatar
AAAAAAAAAAAAAAAAAAAAA I THOUGHT IT WAS RECURCIVE
22:46
the include
22:46
lmao
Avatar
component.h doesn't include it either
Avatar
but actually it would be a disaster to inherit the imports hahaha
Avatar
Avatar
Learath2
component.h doesn't include it either
right, but there was an init, doesn't matter im stupid
22:47
i love u
22:47
❤️
22:48
i'm actually learning c++ haha
22:49
im rly bad at it but ive made a few good changes to this game (edited)
Avatar
I still suggest you grab a book rather than mess around with the game, but y'all do y'all
Avatar
what is a book?
Avatar
It's like a collection of written tutorials from a bygone era
22:50
if they are not made by an Indian I don't care
Avatar
They even used to print them onto thin sheets of bleached carbon using "ink" and bound them together. Truly fascinating stuff
22:52
can i zoom on it?
Avatar
No, but they used to have this ancient invention called a "magnifying glass", it used a specially cut piece of glass to optically enlarge things
Avatar
why not fuck! no accessibility for the most needy, what a monstrosity this is (edited)
Avatar
Avatar
Learath2
No, but they used to have this ancient invention called a "magnifying glass", it used a specially cut piece of glass to optically enlarge things
wtf dark magik
Avatar
Avatar
Learath2
I still suggest you grab a book rather than mess around with the game, but y'all do y'all
its actually more fun to mess with something already made than it is to start from scratch
Avatar
Avatar
Voxel
its actually more fun to mess with something already made than it is to start from scratch
my study style (edited)
Avatar
It's much more fun to mess with it when your tools aren't working against you and the very language you try to express your ideas in isn't alien
22:56
But that's just me, as I said, you do you 😛
22:56
f3
Avatar
Avatar
Learath2
It's much more fun to mess with it when your tools aren't working against you and the very language you try to express your ideas in isn't alien
exactly
Avatar
who is a kog player there?
Avatar
i grew up using scratch lolol
Avatar
Visual programming languages are I guess good places to mess around with stuff
22:58
teaching basic programming i make students use flowgorithm, really easy
Avatar
You teach programming??
Avatar
basic (edited)
22:59
im 18
Avatar
Avatar
Learath2
Visual programming languages are I guess good places to mess around with stuff
it really is fun
Avatar
m_aInputData 😠
Avatar
Idk if microsoft still offers it but Kodu Game Lab was so much fun
Avatar
where does this bastard come from how do i import it to my class >:(>:(>:(>:(>:(
Avatar
Avatar
Learath2
Idk if microsoft still offers it but Kodu Game Lab was so much fun
OHHHHH
23:02
crazy
Avatar
Avatar
kio
where does this bastard come from how do i import it to my class >:(>:(>:(>:(>:(
I'm all out of spoilers for tonight. You'll have to figure that one out for yourself 😛
23:02
how old are u?
Avatar
Avatar
Learath2
I'm all out of spoilers for tonight. You'll have to figure that one out for yourself 😛
if in two days I don't understand it I'll come back and ask you haha
Avatar
Avatar
Learath2
25
ok then getting married is legit
Avatar
You can ask tomorrow too. Spoilers ought to be refilled by then
Avatar
did you go or are you going to university?
Avatar
But pro-tip. Now that you are in a component. Look at other components, if they do something similar to you, maybe you can steal some code
Avatar
im only 20 wtf
Avatar
Avatar
Learath2
You can ask tomorrow too. Spoilers ought to be refilled by then
I gotta try to figure it out, let's see how fast I give up
Avatar
Avatar
kio
did you go or are you going to university?
Going to uni rn. I'll finish my bachelors hopefully this september. I'm just an awful student, way too lazy
Avatar
Avatar
Learath2
But pro-tip. Now that you are in a component. Look at other components, if they do something similar to you, maybe you can steal some code
pro-tips are always still something xd
Avatar
Avatar
Voxel
im only 20 wtf
I'm an old man now
Avatar
Avatar
Learath2
I'm an old man now
granny
Avatar
Avatar
Learath2
Idk if microsoft still offers it but Kodu Game Lab was so much fun
i guess but at the same time, scratch is like, half programming, half animation software
Avatar
Avatar
Learath2
Going to uni rn. I'll finish my bachelors hopefully this september. I'm just an awful student, way too lazy
I don't know what to do with my life
Avatar
Avatar
Voxel
i guess but at the same time, scratch is like, half programming, half animation software
Kodu is like 30% programming 79% game
Avatar
Avatar
kio
I don't know what to do with my life
Don't ask me. I'm sitting alone in the dark having a drink while talking C++ for the maybe 100th weekend in a row. I clearly did something wrong
Avatar
Avatar
Learath2
Don't ask me. I'm sitting alone in the dark having a drink while talking C++ for the maybe 100th weekend in a row. I clearly did something wrong
AHAHAHAHAH
23:07
If that's what you like, that's fine
Avatar
No, that is most definitely not what I like
poggers2 2
Avatar
I'm really stupid, I've seen now that certain types of variables are structs, so CNetObj_PlayerInput rappresents the input
Avatar
Avatar
Learath2
No, that is most definitely not what I like
shit
Avatar
Lol, spam gets deleted so fast
Avatar
i saw that xd
23:10
anyways when i grow up and still have the will to, i want to program useless and niche interactive art ptojects
Avatar
Avatar
Voxel
anyways when i grow up and still have the will to, i want to program useless and niche interactive art ptojects
Conventional wisdom suggests that this is a good idea. Apparently chasing your dreams brings with it much satisfaction
Exported 1,691 message(s)