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-06-08 00:00:00Z and 2023-06-09 00:00:00Z
Avatar
in testing my code i noticed the game does not handle opening a huge file properly
01:44
01:44
segfault here
01:45
winduhs
Avatar
the file is ~8GB, but io_length() is returning 0 it allocates len (0) + 1 bytes, the resulting buffer is too small for any reading, disaster ensues
02:01
i think unsigned is too small for this, size_t or ulong should be used if anyone's trying to refactor this 😃
02:02
but afaik there are no existing issues with this, it just came up in testing my code which reports if the file is too big
02:02
unrealistic scenario
02:05
but yeah either you can expand io_length to return a larger size or you can return from io_read_all if the result is 0 or negative, this at least lets me handle a file being too big
02:08
actually io_length() already returns a long, i don't know what's going on
Avatar
io_tell is returning 0 on this file even though its IOHANDLE is non-null (edited)
02:17
this is probably known behavior and i'm just silly
02:17
it's 8425177088 bytes which is well within the boundaries of even a signed long
02:26
my discord number is robbed
💀 1
02:27
now i'm just tsfreddie
02:34
eyah testing on an 8GiB file is giving me 0 lol // Handle describes an opened non-null IOHANDLE io_seek(Handle, 0, IOSEEK_END); long ExpectedSize = io_tell(Handle); io_seek(Handle, 0, IOSEEK_START); // ExpectedSize is 0
02:34
this blows
Avatar
i'm not finding a fstat io_ euqivalent
02:48
agh
Avatar
anyone ever heard of mingw misunderstanding windows file permissions
03:31
i set the perms of this file through windows security, readable only to admins
03:31
03:31
msys's stat compiled with mingw doesn't get it
03:31
my checks using std::filesystem::perms also wrongfully report it as readable
03:32
i'd have to compile with msvc to make sure this isn't a different issue but setting up vcpkg or whatever would be required to compile ddnet sounds like a nightmare
Avatar
unrelated but what's the naming convention for C++ style loop iterator names
03:43
i usually do it (lowercase) but would It be more appropriate?
Avatar
symlink detection is also screwed
Avatar
@Ewan i hope u are aware u compiled for 32bit
05:13
At least it looks so
05:14
Besides that, yes our system CPP uses int very often instead of the correct usize
05:14
So you probably run out of luck with ddnet for such stuff
05:17
You could read it in chunks. Maybe then it works ^^
Avatar
Avatar
Jupstar ✪
@Ewan i hope u are aware u compiled for 32bit
what makes you think that
Avatar
Avatar
Ewan
what makes you think that
The memory location is 32bit in your image
Avatar
the address width in the screenshot? it's automatically truncated
05:40
it's a 64 bit binary
05:41
mingw w64 and PE header says 64
Avatar
Mh ok weird
Avatar
i'm not sure what's going on with the file loading but i'm convinced that it's not actually ddnet's fault
05:44
yes it should use long wherever needed, but io_tell (which wraps ftell directly) has nothing between the caller and the libc that should narrow the number, and still has this issue
05:44
it may be a mingw issue, but i am using the 64 bit compiler
05:44
the limit is 2GiB exactly
05:44
1 byte less works
Avatar
What function signature does it have
Avatar
this is classic 32 bit issue
Avatar
Avatar
Jupstar ✪
What function signature does it have
returns long
05:44
ill look up actual sig
Avatar
Long would be 32b on windows xd (edited)
05:45
But yeah dunno. Windows is always the problem
Avatar
Avatar
Jupstar ✪
Long would be 32b on windows xd (edited)
I think this is specific to MSVC
05:49
oh i guess not
05:50
ug
05:51
ftell vs. ftello
05:52
ftell returns long which is 32 bit and that's the issue
05:52
ftello is the correct function to use in this case
05:52
annoying
Avatar
I c
05:54
But with std FS it should work tho
Avatar
idk, what u mean
05:55
i could overcome this by doing what the system.cpp does and just casting my IOHANDLE to a FILE * and using ftello myself instead of io_tell
Avatar
Std filesystem
Avatar
the std fs issue is different
Avatar
What issue?
05:55
I mean try using the std
Avatar
std filesystem doesn't define an API for opening and reading/writing from/to files
Avatar
what's confusing
Avatar
I mean there must be some CPP way
Avatar
I think escape button is broken in the server browser
Avatar
oh i thought u meant std::filesystem
Avatar
is it supposed to work in the server browser?
Avatar
yes i could use stl apis for this but i think most ddnet devs would think that using existing ddnet apis is better
05:58
because they can be wrapped and adapted etc
Avatar
Avatar
Tater
is it supposed to work in the server browser?
idk, #bugs
Avatar
I was wondering if its related to #6709
Avatar
The color picker was always consuming the escape hotkey even when already disabled. Regression from #6705 due to changed order of hotkey consumption. Checklist Tested the change ingame Provided ...
Avatar
If u run old code
Avatar
Im on latest
Avatar
Ping rob or create issue then
Avatar
i wonder if adding templates to ddnet system functions would be the move
06:03
type inference should make existing code still work
Avatar
but the system functions can then use ulong/size_t (ull) and the corresponding libc functions (edited)
06:04
i am also happy to live with this limitation lol nobody needs >2GB files
06:04
but future proofing and whatnot
Avatar
Avatar
Ewan
i wonder if adding templates to ddnet system functions would be the move
If u expose it additionally Also no harm in using CPP standard directly
06:05
The system stuff is rather useless
06:05
Most of it
06:05
Not all
Avatar
well, there are a lot of gotchas when using the libc across systems
06:05
platform and compiler differences make things complicated
06:05
having system apis like this lets us account for it
Avatar
Yes that's why u don't rely on c
Avatar
afaik the only cpp apis for this sort of thing are wrapped C APIs (std::fopen, std::fread, etc) and file streams
Avatar
I mean there is ifstream and stuff
Avatar
those are file streams
Avatar
I doubt there is no CPP way xd
Avatar
ifstream = input file stream
Avatar
Perfect
06:07
Then u have it
06:07
streaming :(
Avatar
It's fastest
Avatar
if i use a cpp api then im mixing cpp apis and ddnet system apis
06:08
which i guess there's nothing wrong with at a small scale like this but that kind of irks me
Avatar
Mh yeah, ddnets API simply sucks😂😂
06:09
Why do u need 8gb btw
Avatar
i don't, it's just that i want the file loader thing to be future proof
06:10
i think for now i will just use the ddnet apis, since if ddnet ever needs >2GB files, the ddnet system apis will just be updated
Avatar
Yeah^^
Avatar
this std::filesystem perms/symlink thing is a real bummer
06:11
i expected more of mingw
06:11
if i want to expose this functionality
06:11
i have to use winapi
Avatar
I didn't read everything u said sry
Avatar
Avatar
Ewan
Click to see attachment 🖼️
yea so i have a hunch that mingw is incorrectly reporting filesystem stuff
06:12
firstly std::filesystem::perms and std::filesystem::is_symlink and the like do not work for me on mingw
Avatar
Oh
Avatar
perms incorrectly reporting files as readable. and is_symlink thinking that the symbolic link i made with powershell is indeed not a symlink
Avatar
Sad
06:13
though, fs_* functions could be added to stat permissions and symlink status
06:14
oh shit
06:15
fs_listdir_fileinfo leverages WIN32_FIND_DATAW on windows, contains a symlink flag
06:16
but it's not exposed by CFsFileInfo, the file info type used by FS_LISTDIR_CALLBACK_FILEINFO which is the fn ptr signature that fs_listdir_fileinfo uses
06:16
annoying!
06:16
i think this is a conversation for later on github
06:17
i either add this stupid functionality or i don't add file permission/symlink status to the file loader
06:20
just saw this for the first time in the loading menu. cheeky if(m_Menus.IsInit()) { char aBuff[256]; str_format(aBuff, std::size(aBuff), "%s [%d/%d]", CompCounter == 40 ? Localize("Why are you slowmo replaying to read this?") : Localize("Initializing components"), (CompCounter + 1), (int)ComponentCount()); m_Menus.RenderLoading(pLoadingDDNetCaption, aBuff, 1 + SkippedComps); SkippedComps = 0; }
Avatar
I'm so glad the translators localize that text
06:21
lol
06:21
localize all
06:21
it's the way to go
Avatar
I have no idea why they would allow std::regex in the standard without an error checking mechanism besides a single exception (edited)
06:28
which I can't even use because... exceptions are off
06:29
so i have to just pray the expression passed is valid, or do my own stupid regex parsing
06:29
they don't even have an operator bool()
Avatar
Yep sucks hard
06:31
I wanted to add regex search support a while ago
Avatar
they don't provide comparison operators either, so i can't even have a known dud std::regex object for comparison
06:32
you're just fucked
Avatar
ChillerDragon BOT 2023-06-08 06:59:29Z
!jup emote and pinger completion now appends a : and a space for better emote spam and pingering
Avatar
chillerbot1 BOT 2023-06-08 06:59:30Z
@Jupstar ✪
Avatar
ChillerDragon BOT 2023-06-08 07:00:06Z
because pings without space at the end dont hit. like this one @Jupstar ✪! so now you can instantly type after complete no need for : or space
Avatar
ws-client BOT 2023-06-08 07:00:24Z
<ChillerDragon> poggers2
Avatar
Epic
Avatar
ws-client BOT 2023-06-08 07:02:22Z
<Jupstar> 😂 yeah very nice
07:05
<ChillerDragon22> is that me being color blind or is that ugly af and super hard to read?
07:06
<ChillerDragon22> oh and html moment it swallowed the spaces
Avatar
I am colorblind and I can say it is ugly af and super hard to read
Avatar
ws-client BOT 2023-06-08 07:08:29Z
<ChillerDragon> men are blind af
07:08
<ChillerDragon> where developer girls?
Avatar
When fix ur client
Avatar
deentroll
Avatar
ws-client BOT 2023-06-08 07:11:01Z
<ChillerDragon> oh yea @fokkonaut that looks much more sexy
Avatar
im not colorblind but dark blue on dark background is risky xd
Avatar
ws-client BOT 2023-06-08 07:12:16Z
<ChillerDragon> since 50% of the webclient users are color blind i gotta do something
07:12
A bratty AI system that listens, learns, and challenges
Avatar
@fokkonaut do you read your user name here in discord in blue color?
Avatar
u mean dev role?
Avatar
yes
Avatar
no thats purple to me
Avatar
what color blindness do you have then?
07:13
most ppl have green red
Avatar
me too, but i think also some other degree. Colors I can easily mix up depending on light level, etc: brown - red green - orange yellow - light green pink - grey blue - purple etc.
Avatar
i c
Avatar
sometimes its more clear sometimes not, depending on tone, light, and other factors
Avatar
don't tell others, but my test to check if gamer girl is girl is to ask if dark purple is blue 😂
07:15
worked a few times already xD
Avatar
first question people have: "how do you see traffic lights" - well, first im not dumb and green is at the bottom, and next up that green is more white already xD
Avatar
Avatar
Jupstar ✪
worked a few times already xD
xDDD
Avatar
ws-client BOT 2023-06-08 07:16:21Z
<ChillerDragon> because gril eye more op than male?
Avatar
yeah
Avatar
ws-client BOT 2023-06-08 07:16:30Z
<ChillerDragon> indeed
07:16
<ChillerDragon> smort test
Avatar
statistically like 10% of men are color blind, but only like 1% of women
07:16
smth like that
Avatar
ws-client BOT 2023-06-08 07:16:51Z
<ChillerDragon> so u gamer girl?
Avatar
I am hehe
Avatar
i am gamer girliest
Avatar
ws-client BOT 2023-06-08 07:18:26Z
<ChillerDragon> UwU
07:20
@Jupstar ✪
Avatar
ws-client BOT 2023-06-08 07:20:37Z
<ChillerDragon> international foggonut
Avatar
for me the top 5 bars are very very similar, except in the 2nd and 3rd row the yellow/green spectrum is a little more bright/pale
Avatar
Avatar
fokkonaut
for me the top 5 bars are very very similar, except in the 2nd and 3rd row the yellow/green spectrum is a little more bright/pale
uff, for me all are completely different 😄
Avatar
Then I am definitely more colorblind than you :P Yet I can see the dev role as purple
07:22
how about this?
Avatar
fuck you
Avatar
what color do you see?
Avatar
thats blue
07:23
xD?
Avatar
ah ok
Avatar
IS IT
07:23
??
Avatar
yeah the color often works
07:23
no its purple too
07:23
but a darker version
Avatar
it looks more blue to me
Avatar
seems like they especially struggle with dark purple
Avatar
its on the edfe
07:23
edge
Avatar
ws-client BOT 2023-06-08 07:23:43Z
<ChillerDragon> edge-l
Avatar
but purple
Avatar
ryo here when its gettin edgy
07:24
xdd
Avatar
Avatar
Jupstar ✪
seems like they especially struggle with dark purple
when i was younger, i painted the sky purple until my teacher said "ehh, why you do that"
Avatar
thats when i first really noticed xdxd and another teacher was mad at me until i said "dude, im colorblind you fucking cunt" and then she shut up and apologized
07:25
xd
Avatar
Avatar
fokkonaut
when i was younger, i painted the sky purple until my teacher said "ehh, why you do that"
lel
Avatar
@Jupstar ✪ ask me yellow/green ish
07:27
its so hard for me
07:27
tee skins
Avatar
@fokkonaut yellow/green ish?
Avatar
skins
Avatar
dad joke
Avatar
have to make a skin first 😄
Avatar
my bad joke flew by
07:28
not good morning
Avatar
did you skip gym today
Avatar
im at gym rj
07:28
makes sense
Avatar
u need to stimulate your brain
07:29
then it works better
07:29
xd
07:29
its like those who need coffee
07:29
or me who needs nictoine :x
Avatar
this one is hard
Avatar
thats green
07:30
its closer to yellow than green
Avatar
where the fuck is green and yellow
07:30
Avatar
yellow is left
07:30
red to yellow to green
Avatar
put the slider to where green begins
Avatar
i think it's hard to say even for non colorblind
Avatar
Avatar
Jupstar ✪
its closer to yellow than green
National Insurance Clerk 2023-06-08 07:31:02Z
That's true, but it looks very similar to the apple skin, named "apple green"
07:31
Kinda canon?
07:31
Well what the hell does canon mean in this context
Avatar
National Insurance Clerk 2023-06-08 07:31:29Z
I gotta think before I type
Avatar
i'd around here is "clear" green
Avatar
National Insurance Clerk 2023-06-08 07:31:51Z
Yeah that's sensible
Avatar
@Jupstar ✪ for example, now in comparison, and with the box around it, i can see the differences pretty good
07:32
comparison is always a good thing for colorblind people
Avatar
National Insurance Clerk 2023-06-08 07:32:29Z
But theres everything in between yellow and you'd typically call a shade of green, rather than a shade of yellow
Avatar
Avatar
National Insurance Clerk
Yeah that's sensible
sensitive*
Avatar
the default skin probably makes it a bit darker
Avatar
National Insurance Clerk 2023-06-08 07:33:14Z
No no
Avatar
but i'd say it's still yellow
Avatar
National Insurance Clerk 2023-06-08 07:33:17Z
Sensible
07:33
As in makes sense
07:33
ye
07:33
sry i thought u r @ChillerDragon english pro
Avatar
ws-client BOT 2023-06-08 07:34:01Z
<ChillerDragon> wot
07:34
<ChillerDragon> pinger
07:34
xD
Avatar
ws-client BOT 2023-06-08 07:34:22Z
<ChillerDragon> axaxax
Avatar
"Lime is a color that is a shade of yellow-green, so named because it is a representation of the color of the citrus fruit called limes. " https://en.wikipedia.org/wiki/Lime_(color)
Lime is a color that is a shade of yellow-green, so named because it is a representation of the color of the citrus fruit called limes. It is the color that is in between the web color chartreuse and yellow on the color wheel. Alternate names for this color included yellow-green, lemon-lime, lime green, or bitter lime.
Avatar
its 5 years ago why i still remember this shit
Avatar
i'd say its on the yellow part of the lime color xD
Avatar
lime best
Avatar
left is the color in the ddnet color picker, then comes lime from wikipedia, then the color the tee has
07:37
Avatar
default skins has always been more green/beige for me
Avatar
same colors tee, color picker, wiki
Avatar
its so warm in the office...
07:40
since i have just opened one of these, which color is this?
Avatar
id say thats green like the leaf on it
07:41
grass green maybe
07:41
bit lighter
Avatar
green yes, but the green from the leaf is way darker
Avatar
its a bit darker yes
Avatar
in real life at least
07:41
but ye its green i guess so too
07:42
@Jupstar ✪ u work in an office?
Avatar
sometimes xd
Avatar
u have a table that u can change the height?
Avatar
yes
Avatar
do you use it
Avatar
no 😂
Avatar
im using it right now for the first time, its pretty nice actually
Avatar
i used it 5 times and then decided it sucks
Avatar
i dont think it sucks tbh, been standing for one hour almost
Avatar
generally its cool to adjust the height but i probably prefer to work while sitting
Avatar
me too, but its nice and healthy
07:43
ofc not 8h standing
07:43
but being able to stand up when ur back hurts or whatever
Avatar
office jobs are always bad for your health xd
07:44
i slowly feel that im getting older xD
Avatar
ye but mostly back problems
07:44
working on the roof for years is also not good
07:44
or on baustel
07:45
baustelle
07:45
construction side worker
07:45
whatever
Avatar
Closes #6718.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/...
Avatar
conclusion: work is not healthy
Avatar
conclusion: life sux
Avatar
cant argue about that
07:48
xddd
Avatar
but its still worth it
Avatar
use rust to ease the pain
Avatar
Avatar
Ryozuki
use rust to ease the pain
sorry i dont need more pain
Avatar
ws-client BOT 2023-06-08 07:51:45Z
<ChillerDragon> wait i still didnt add :fuckyousnail: id?
07:52
<ChillerDragon> ryo go leak id
Avatar
ws-client BOT 2023-06-08 07:54:31Z
<ChillerDragon> ty
07:56
<ChillerDragon2> pog pog fuckyousnail
Avatar
@fokkonaut
Avatar
you are lurking
Avatar
i like ur tortilla picture
Avatar
Avatar
cyberFighter
you are lurking
no
07:58
i am working laptop + 2 screens so i can spot your pings faster than the light travels
Avatar
ok
Avatar
WAIT
Avatar
?
Avatar
is your profile picture
07:58
this one thing
Avatar
ws-client BOT 2023-06-08 07:58:59Z
<ChillerDragon2> ?xd
Avatar
wait
Avatar
what thing
07:59
this
Avatar
no
Avatar
Avatar
ws-client
<ChillerDragon> ryo go leak id
u should consider using the discord api
08:00
instead of asking for every emoji xd
Avatar
Avatar
Ewan
instead of asking for every emoji xd
troll
Avatar
ws-client BOT 2023-06-08 08:01:03Z
<ChillerDragon2> @Ewan i got all
Avatar
ws-client BOT 2023-06-08 08:01:13Z
<ChillerDragon> all i need*
Avatar
a3abc27 Fix escape not working in server browser and demo browser - Robyt3 a7a0ba7 Merge #6719 - bors[bot]
Avatar
i hate css flip animations
09:10
why is it so dumb
Avatar
ChillerDragon BOT 2023-06-08 09:10:59Z
flippin css
09:11
i am still waiting for a browser with proper front end error messages for html and css
09:11
because i refuse to use bloated css and html generators
09:12
we should replace ddnet desktop client with a mobile first electron app
Avatar
great idea
Avatar
write a DDNet launcher in rust, so graphics settings can be changed outside of the client
Avatar
ChillerDragon BOT 2023-06-08 09:15:35Z
oh yea ddnet launcher like polyMC would be cool
Avatar
a settings editor should be ez
09:15
i could make it
09:15
with egui
Avatar
we just need to be able to change the graphics settings that crash the client for some people
Avatar
ChillerDragon BOT 2023-06-08 09:16:21Z
different config directories and different bot versions in one launcher
Avatar
and buttons to open the config directory, website etc would be nice
09:17
ill look into it
Avatar
ChillerDragon BOT 2023-06-08 09:17:08Z
are there configs that crash the client on launch even?
09:17
never seen it
Avatar
it could also detect if the client crashes and show a helpful message
Avatar
ChillerDragon BOT 2023-06-08 09:17:55Z
ye!
Avatar
for some graphics cards and backends it seems to crash
09:18
and we can't detect this in the client, so we need a launcher
Avatar
ChillerDragon BOT 2023-06-08 09:18:15Z
how would it work with steam tho?
09:18
does the steam game launch the ddnet launcher?
Avatar
yeah, but we could at an option to the launcher to skip it maybe
09:18
add*
Avatar
ChillerDragon BOT 2023-06-08 09:18:53Z
ye
Avatar
since when heinrich not admin but this weird role xd
Avatar
ChillerDragon BOT 2023-06-08 09:19:01Z
sounds like a lot of work but would be cool
Avatar
since always
Avatar
really
Avatar
@fokkonaut actually idk if its cuz me
09:19
probs not
Avatar
i never saw this role before
Avatar
ChillerDragon BOT 2023-06-08 09:19:29Z
heinrich refuses to in game admin him self
Avatar
but back then
09:19
i rly was anti heinrich being admin
09:19
xd
Avatar
ChillerDragon BOT 2023-06-08 09:19:44Z
heinrich is ssh admin only
Avatar
so i guess they made it not obvious
Avatar
ah so he is admin but not officially
09:19
ye
09:20
very unobvious
09:20
xd
Avatar
ChillerDragon BOT 2023-06-08 09:20:04Z
he is also technically never authed in game
Avatar
ChillerDragon BOT 2023-06-08 09:20:10Z
you can ez kickvote him
09:20
i know from a friend
kek 2
Avatar
we all know he gets to decide most stuff
Avatar
ChillerDragon BOT 2023-06-08 09:20:31Z
decide yes
09:20
but no ingame powa
09:20
so no regular admin
Avatar
thats not the definition of admin
Avatar
he has
Avatar
ChillerDragon BOT 2023-06-08 09:20:46Z
you cant pinger him for ingame moderation
Avatar
ingame admin is the least of problems lel
09:21
like i couldnt care less
Avatar
hot topics
Avatar
ChillerDragon BOT 2023-06-08 09:21:25Z
ye other than that he might be the person in tw with the most power
Avatar
forgot to mention chiller
09:21
docker is cool for auto-restart when crashing, no need to make a bash script for that
Avatar
ChillerDragon BOT 2023-06-08 09:22:02Z
bash script is cool for auto restarz when crashing, no need to use docker for that
09:22
while :; do DDNet-Server; done
Avatar
heinrich for example decided (mostly alone?) the hold hammer on freeze thing
09:22
which has been a before and after for ddnet
Avatar
ChillerDragon BOT 2023-06-08 09:22:36Z
that was intense change yes
Avatar
btw @Robyt3 is this a good place for the Preview button?
Avatar
feels weird being together with the buttons that change the sorting
Avatar
@Mr.Gh0s7 was it hard to implement?
09:23
i didnt look at the pr but im curious
Avatar
Avatar
Ryozuki
@Mr.Gh0s7 was it hard to implement?
Since I managed to do it nope
Avatar
nice feature
09:24
xd
Avatar
Avatar
Robyt3
feels weird being together with the buttons that change the sorting
Hmm it must be on the Filemanager/explorer though else it'll be frustrating to change it
Avatar
yeah. what if it's on the right side like you can expand the server browser in vanilla
Avatar
Avatar
Mr.Gh0s7
Since I managed to do it nope
well I just hooked it up to the editor code so I didn't do much tbh
09:25
ok will do that ;)
Avatar
Avatar
Ryozuki
which has been a before and after for ddnet
ye and either did he not think about it or just went for it
Avatar
Avatar
Robyt3
Click to see attachment 🖼️
No multiline texts?
Avatar
maybe not outside if that causes issues
Avatar
Avatar
Cellegen
No multiline texts?
I think they exist but vanilla chose not to do it
Avatar
Or they didn't need it
Avatar
hi roby
Avatar
we didn't use the whole "Playing/Spectating ... on ... " text either
09:28
hi fokko
Avatar
kokkonaut
Avatar
ryozoozki
09:29
zooz
Avatar
fun fact, i dont zooz on fng
banhammer 1
Avatar
fun fact, i have a proxy which fills up fng server so every part of the map is visible for at least 1 client and then all the info gets sent to my main client so i can zooz in peace
Avatar
which fng though?
Avatar
its a joke
Avatar
Avatar
fokkonaut
fun fact, i have a proxy which fills up fng server so every part of the map is visible for at least 1 client and then all the info gets sent to my main client so i can zooz in peace
Ah yes, you just invented dos
09:31
i find it funny, 90% of the things you say are random
Avatar
kek not the dos operator
09:31
dos attacks
Avatar
so random xd
Avatar
sorry, I'll write more specifically in the future
Avatar
Avatar
fokkonaut
i find it funny, 90% of the things you say are random
please try /cellegen random to make me say random bs (don't make a bot which does that justatest ) (edited)
Avatar
Avatar
fokkonaut
i find it funny, 90% of the things you say are random
always been like this
09:33
justatest
Avatar
Avatar
Ryozuki
always been like this
that's why you guys hate me so much, and I'm living for it
Avatar
Avatar
ws-client
What syntax highlighting lib are you using?
09:41
All of them i tried sucked
09:41
I ended up using monaco editor guts and it works pretty well
Avatar
nothing is better than tree sitter
Avatar
but idk if it has a js lib
09:42
tree sitter is best
09:42
neovim uses it
Avatar
yea i meant web ones
Avatar
its so good its on par with a lsp backed highlighter
09:43
yeah tree sitter is standalone too
09:43
A syntax highlighter for the web using tree-sitter. - GitHub - edg-l/treelight: A syntax highlighter for the web using tree-sitter.
09:43
i made this
09:43
but may be a bit broken
09:45
i should retake it xd
Avatar
yea my website surely needs a bit of love too
09:45
i just don’t do the web stuff often
09:45
the vanilla js approach sucks more and more
09:45
as time goes on
Avatar
8bdffee Improve scrollbar option UI - Robyt3 651cfd9 Improve joystick settings UI especially on 5:4 and 4:3 resolutions - Robyt3 e0bdad8 Remove DoScrollbarOptionLabeled - Robyt3 4c92309 Use DoScrollbarOption instead of DoScrollbarH for settings - Robyt3 6bffc85 Merge #6720 - bors[bot]
Avatar
hey @Robyt3 while you're doing all these dope UI improvements, should u add a horizontal mode to the scroll viewer?
Avatar
do we need horizontal scrolling anywhere though?
Avatar
i did for some stuff, my implementation is outdated now, and it blows anyway
Avatar
it's somewhat inconvenient I'd say, because most users don't have horizontal scrolling mouse wheels either
Avatar
as long as it's not bi-directional scroll main mouse wheel works too
09:50
also, shift or alt + scroll wheel is the convention for that
Avatar
I'll consider adding it eventually
Avatar
all my implementation did was map x/y to y/x and w/h to h/w, etc.
09:52
swap dimensions
09:53
it was fine
09:53
it just would have been better if there was more time put into it and less fear of breaking other shit
09:57
oh yeah, it would be nice if when the game is maximized on close it'll be maximized when opened again
11:13
sweet
11:17
i added fs_is_readable and fs_is_symlink (edited)
11:17
the former is easily expandible to account for write and exec access too, i just have it that way atm
Avatar
how does fs_is_readable work? as far as I know, you can never know if you can truly read/write a file unless you try
11:19
at least on Windows
Avatar
i was originally using std::filesystem for checking readable/symlink status, but it turns out that on MinGW the platform differences of how permissions and softlinks work are so different, they just decided screw it & to make the API report wrong stuff
11:19
on Windows i'm using security APIs for is readable
Avatar
well, as long as nobody tries using the game on a network drive
11:21
generic_access_rights on line 10 is saying to only check for read access, we can easily bind this enum & add another parameter if anyone cares (edited)
Avatar
what do you need this for?
Avatar
i'm creating an object that will read files in batches & since it's going to be relatively abstract i want it to be versatile and the errors to be descriptive
11:23
i plan to make an async version and use that for skin and asset loading. but it's not needed for those atm, though it would be nice to say why a read failed
Avatar
couldn't you call GetLastError on Windows or check errno on UNIX after the operation already failed?
Avatar
PANIC
Avatar
Avatar
Jupstar ✪
PANIC
@RYOzu
Avatar
lel
Avatar
nice ping
11:24
Hi RYO
11:24
welcome to dev chat
Avatar
Avatar
Jupstar ✪
PANIC
ddnet_engine_shared.lib(std-391022a4250a8b9a.std.feb3b897-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol __imp_NtCreateFile referenced in function _ZN3std3sys7windows2fs20open_link_no_reparse17h9b3d5753800c4b4fE [D:\a\ddnet\ddnet\debug\game-server.vcxproj] ddnet_engine_shared.lib(std-391022a4250a8b9a.std.feb3b897-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol __imp_RtlNtStatusToDosError referenced in function _ZN3std3sys7windows2fs20open_link_no_reparse17h9b3d5753800c4b4fE [D:\a\ddnet\ddnet\debug\game-server.vcxproj] ddnet_engine_shared.lib(std-391022a4250a8b9a.std.feb3b897-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol __imp_NtReadFile referenced in function _ZN3std3sys7windows6handle6Handle16synchronous_read17h609a485d92162e8dE [D:\a\ddnet\ddnet\debug\game-server.vcxproj] ddnet_engine_shared.lib(std-391022a4250a8b9a.std.feb3b897-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol __imp_NtWriteFile referenced in function _ZN3std3sys7windows6handle6Handle17synchronous_write17h5e143db420a86fa8E [D:\a\ddnet\ddnet\debug\game-server.vcxproj] D:\a\ddnet\ddnet\debug\DDNet-Server.exe : fatal error LNK1120: 4 unresolved externals [D:\a\ddnet\ddnet\debug\game-server.vcxproj] This is the third time a CI build failed on Windows like this in the last two days
Avatar
Avatar
Robyt3
couldn't you call GetLastError on Windows or check errno on UNIX after the operation already failed?
not afaik, seems unintended with io_* because it's all wrapped
11:25
and it wouldn't be as descriptive anyway
Avatar
Even better, github is not loading for me at all 😄
Avatar
wow this blows
Avatar
I'm wondering how we can break linking non-deterministically. My assumption is that is a VS problem?
Avatar
damn my new laptop is great, but not graphic card rip
Avatar
VS forget the mutex
Avatar
Avatar
ReiTW
damn my new laptop is great, but not graphic card rip
hardware info or did not happen
Avatar
I have a intel iris xe
Avatar
Avatar
Robyt3
do we need horizontal scrolling anywhere though?
Maybe the sliders in settings? Some games do that
Avatar
i5-1240p, 16gb ddr5 4800MHz, and a beautiful oled screen 2.8k
Avatar
that is some fast ram
Avatar
Avatar
murpi
Maybe the sliders in settings? Some games do that
yeah, we have the value sliders, but we don't have any scroll regions where the content scrolls horizontally
Avatar
Avatar
ReiTW
i5-1240p, 16gb ddr5 4800MHz, and a beautiful oled screen 2.8k
nice, but how can it not have a GPU then 😂
Avatar
it's a pro laptop, not for gaming
11:34
zenbook 14 ux3402za
Avatar
Avatar
Robyt3
yeah, we have the value sliders, but we don't have any scroll regions where the content scrolls horizontally
fwiw i added it in my status bar settings gui, it was sort of unique https://cdn.discordapp.com/attachments/806786136474910730/1093164149846061177/2023-04-05_07-23-04.mp4
11:35
mute video
Avatar
Avatar
Jupstar ✪
nice, but how can it not have a GPU then 😂
some CPUs don't have graphic drivers compatibility
Avatar
Avatar
Cellegen
some CPUs don't have graphic drivers compatibility
wat xd
Avatar
Avatar
Ewan
fwiw i added it in my status bar settings gui, it was sort of unique https://cdn.discordapp.com/attachments/806786136474910730/1093164149846061177/2023-04-05_07-23-04.mp4
fresh music 😂
11:36
this is old video
11:36
i forgot to mute
Avatar
Avatar
Jupstar ✪
wat xd
As I wrote, some intel CPUs cannot use intel graphic drivers like UHD, because it is not compatible
Avatar
by gpu I meant a nvidia chip or smth like that, It is using the iGPU obv
Avatar
Avatar
Cellegen
As I wrote, some intel CPUs cannot use intel graphic drivers like UHD, because it is not compatible
wat xd
Avatar
Avatar
Cellegen
As I wrote, some intel CPUs cannot use intel graphic drivers like UHD, because it is not compatible
that makes no more sense
Avatar
Avatar
ReiTW
by gpu I meant a nvidia chip or smth like that, It is using the iGPU obv
yeah i read it like that 😄
Avatar
Avatar
Cellegen
As I wrote, some intel CPUs cannot use intel graphic drivers like UHD, because it is not compatible
the only case that i know where the iGPU could not be used was when the monitor was plugged into the gpu (even for laptops this exists)
11:37
so it was forced to use the high perf GPU instead
11:38
even then it might™️ still be usable offscreen
11:38
depending if the driver allows this
Avatar
Ok, in technical terms, what I mean is, some CPUs' Processor Graphics don't have a driver for you to install and instead uses the system based Graphics driver to display
Avatar
Avatar
Cellegen
Ok, in technical terms, what I mean is, some CPUs' Processor Graphics don't have a driver for you to install and instead uses the system based Graphics driver to display
Describes why a computer manufacturer installation warning appears before updating a graphics driver via the Intel® Driver & Support Assistant (IDSA).
Avatar
So yes, you cannot use drivers on some CPUs like mobile CPUs cuz it only uses the system graphics
Avatar
Only if the igpu is really really old
11:39
and that's moot since a driver did exist for it at some point
Avatar
its called OEM and u can disable that/ignore that
Avatar
Avatar
Ewan
Only if the igpu is really really old
Some 2010 computers / laptops are still around (edited)
Avatar
It would have to be even older
Avatar
even they simply got the drivers from intel and simply customized them a bit
11:40
bcs what do i know.. they maybe added a wifi controler or stuff like that
11:41
that would break else
11:41
back in the old days the GPUs also often were not part of the CPU
11:41
but of the motherboard
Avatar
I think who knows how an old 2000's computer ran would know this info
Avatar
Why are you sassing
Avatar
anyway anything before 2015 is dead for me
11:42
xd
11:42
oh we in 2023 already
11:42
then lets up it to 2018
11:43
5 years support
11:43
chairn trigger warning ^
Avatar
Avatar
Jupstar ✪
anyway anything before 2015 is dead for me
I think for today's standards, thats still a pretty good date
Avatar
computer industry evolves so fast, everything gets bloated, nobody understands anything anymore
11:44
AMD releases integrated gpus and drop support after only like 2 years lmao
Avatar
Avatar
Jupstar ✪
anyway anything before 2015 is dead for me
I'll keep reporting problems on my 2009 laptop though 😄
Avatar
2000 what?
11:52
the funny thing about computer industry is that it's completely different than any other industry it evolves insanely fast almost no backward compability open source (free premium quality luxus stuff, wtf :D) relatively progressive community (complete opposite of most "normal" ppl)
11:52
i mean in just 20-30 years we got so far xd
Avatar
Avatar
Robyt3
maybe not outside if that causes issues
I didn't managed to do it outside the file{manager,explorer} so I did it inside 😉 . Also I made it so the View resizes whether map preview is active
Avatar
that's why u have to stay on the train
11:53
friss oder stirb
Avatar
cuz we care of this tech, people make insane money off of it and we found ways to exploit many things in the world with computers alone
Avatar
Avatar
Mr.Gh0s7
I didn't managed to do it outside the file{manager,explorer} so I did it inside 😉 . Also I made it so the View resizes whether map preview is active
I should also mention I still haven't managed to successfully clip the contents of some maps. idk what breaks
Avatar
Avatar
Mr.Gh0s7
I didn't managed to do it outside the file{manager,explorer} so I did it inside 😉 . Also I made it so the View resizes whether map preview is active
Can you snap the camera to the checkpoint 1 entity, so that wherever that cp1 entity is, it'll default the camera's position to that?
Avatar
Avatar
Cellegen
Can you snap the camera to the checkpoint 1 entity, so that wherever that cp1 entity is, it'll default the camera's position to that?
I haven't reached that part but yeah I will do that ;)
Avatar
Avatar
Mr.Gh0s7
I didn't managed to do it outside the file{manager,explorer} so I did it inside 😉 . Also I made it so the View resizes whether map preview is active
nice desktop envirement ⭐
justatest 1
Avatar
Avatar
Teero
nice desktop envirement ⭐
it's dwm with gaps and picom with round corners and stuff
11:56
what distro?
Avatar
artix
Avatar
Avatar
Mr.Gh0s7
I didn't managed to do it outside the file{manager,explorer} so I did it inside 😉 . Also I made it so the View resizes whether map preview is active
does it now use a viewport, or did u solve it differently?
Avatar
Avatar
Mr.Gh0s7
artix
what do you use for the bar?
Avatar
Avatar
Teero
what do you use for the bar?
dwm has a bar and I use that
Avatar
hmm okay
Avatar
Avatar
Jupstar ✪
that's why u have to stay on the train
I'm extremely skeptical of new developments in the software industry. It's layers upon layers of abstractions which are hiding all the interesting interactions and make debugging and end-to-end testing nigh impossible. It works for megacorps, but for smaller companies I think it can actually be a competitive advantage not to buy into all the hype.
Avatar
Avatar
Jupstar ✪
does it now use a viewport, or did u solve it differently?
It still as it is I didn't manage to use the background menu's inner workings pepeH
Avatar
Avatar
deen
I'm extremely skeptical of new developments in the software industry. It's layers upon layers of abstractions which are hiding all the interesting interactions and make debugging and end-to-end testing nigh impossible. It works for megacorps, but for smaller companies I think it can actually be a competitive advantage not to buy into all the hype.
you are not wrong. but the mega corps give the direction, that's why i wrote "friss oder stirb" that's their spirit. I also agree that it can get very annoying that abstractions destroy everything, but not every abstraction comes because of making stuff easier, but are also build for backward compability. If you'd redesign an OS nowadays u probably have to add many layers to it, just to emulate existing stuff 😄
12:00
i'd generally say modern APIs are often bloated bcs they want to support to many varrying hardware controllers, joysticks, what do i know what exists and users having one of the unsupported things get directly mad xD
Avatar
Avatar
Ewan
Click to see attachment 🖼️
you probably want to open the file and report the error of that instead
12:04
checking access rights is incredibly error-prone and not actually guaranteed to work
Avatar
that’s not the only thing I’m checking lol (edited)
Avatar
ChillerDragon BOT 2023-06-08 12:05:19Z
heinrich ur name is so hard to make a funny nickname of
12:05
but when python huffman?
Avatar
hmmmm :/
Avatar
ChillerDragon BOT 2023-06-08 12:05:48Z
this summer?
Avatar
theoretically I'd love to have a release of uniffi
12:05
but I guess I can't wait for that
Avatar
ChillerDragon BOT 2023-06-08 12:06:08Z
any ETA?
Avatar
so maybe(!) I can look into it this evening
Avatar
ChillerDragon BOT 2023-06-08 12:06:13Z
how fast is their dev cycle?
Avatar
no ETA
Avatar
ChillerDragon BOT 2023-06-08 12:06:20Z
release sounds good
Avatar
so let me try without
12:06
sorry for the wait already
Avatar
ChillerDragon BOT 2023-06-08 12:06:30Z
np
12:06
i told u im ok w wait
Avatar
(in the evening, maybe(!))
Avatar
ChillerDragon BOT 2023-06-08 12:06:46Z
i rather wait and have it clean than getting deprecated
12:07
you can also code libtw2 snapshot support while waiting for release :p
Avatar
you mean wireshark dissector snapshot support? (edited)
12:17
is that still interesting to you?
Avatar
@Jupstar ✪ anything before 2020
12:22
justatest
Avatar
Avatar
Ryozuki
@Jupstar ✪ anything before 2020
rust stable cammostripes
12:24
my case is pre 2020, old hardware
12:24
gotta replace
Avatar
xDDDDD
Avatar
robsterbyte, u have to change server config and restart
12:37
friendly reminder
Avatar
ChillerDragon BOT 2023-06-08 12:53:48Z
@heinrich5991 probably always will be even after i finished all my protocol implementations and 0.7 support
12:54
it would be a nice to have for traffic analsis in general but yea also would help a lot to create test cases for my implentations but i can also manage without
12:55
i implemented snap items in ruby already so yeah .. but would be nice anyways
Avatar
when are fast emotes back
Avatar
ChillerDragon BOT 2023-06-08 13:31:10Z
just edit your client to render emote event instead of sending emote msg
Avatar
Avatar
bencie
when are fast emotes back
yes pls
13:31
i die so hard
Avatar
isnt the change already in
Avatar
ChillerDragon BOT 2023-06-08 13:31:22Z
then it feels fast eventho u dont send anything xd
Avatar
yes
Avatar
not all servers restarted yet
Avatar
still need to be recompiled
13:31
ah, did you already recompile?
Avatar
fast fast
13:31
pepeFASTJAM
Avatar
u accidentially use evil emote, cant even correct for 1 seond all ppl on server completely mad on you
Avatar
ws-client BOT 2023-06-08 13:33:20Z
<ChillerDragon2> yea ik i miss emote 50% correction so important xd
13:33
<ChillerDragon2> nice emote ryo xd
13:34
<Jupstar> oh, why can u see it
13:34
<Jupstar> why are messages grouped so weirdly
13:35
<Jupstar> confusing af xD
13:35
<ChillerDragon2> because i did hotreload while deving
13:35
<ChillerDragon2> to see ryo emote xd
13:35
<Jupstar> lel
13:35
<ChillerDragon2> i have a 6 letter alias to deploy to prod
13:36
<Jupstar> does hotreload work now?
13:37
<Jupstar> did u document that command?
Avatar
@ChillerDragon why dont you send the webhook message properly btw, by using the username field for the actual username?...
Avatar
It's not a discord webhook. It's an irc bot actually
Avatar
ah yea, true
Avatar
ws-client BOT 2023-06-08 13:51:47Z
<ChillerDragon> ssh chiller@zillyhuhn.com -t "cd /var/www/discord-irc/ && source ~/.nvm/nvm.sh && git pull && npm run build"
Avatar
leak
Avatar
ws-client BOT 2023-06-08 13:52:42Z
<ChillerDragon> @Jupstar no hot reload just effortless deploy to production for me
13:55
<ChillerDragon> fakin newlines are so hard ._.
Avatar
what u doing
14:00
wdym by fake
14:00
new lines
14:00
p { white-space: pre; }
14:00
or pre-line
Avatar
ChillerDragon BOT 2023-06-08 14:00:47Z
ye ye ik pre
14:01
but somehow my fake irc multi line causes newlines to be duped
14:01
its not really a css issue its more a chiler brain issue
Avatar

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addres...
Avatar
Robyte full time ddnet employee
14:36
😬
Avatar
he's separating his work more cleanly, makes for more commits
14:49
but he's also been active quiiiite a lot
Avatar
better delete 1.3 million whatever 😬
14:52
@Ryozuki did your contribution mapping finally pay out 😂
14:54
github is dumb
14:54
so im missing 100 commits
Avatar
60f56f4 Support arbitrary number of type/country filter buttons - Robyt3 bc70726 Add highlight color when hovering DDNet/KoG type/country filters - Robyt3 7b93e41 Merge #6722 - bors[bot]
Avatar
ChillerDragon BOT 2023-06-08 15:16:50Z
skill issue
15:16
github gaming
Avatar
Avatar
Jupstar ✪
better delete 1.3 million whatever 😬
I wonder how that happened 😄
Avatar
let's guess
15:31
libraries
Avatar
prolly
Avatar
Avatar
Jupstar ✪
better delete 1.3 million whatever 😬
i believe that's when someone added boost to the repo
Avatar
wat, why did they remove it ;~;
Avatar
boost has bad compile times, I think
17:14
factorio removed it due to that
Avatar
if thats an argument you should never use rust xD
f3 1
pepeH 2
Avatar
ws-client BOT 2023-06-08 17:24:28Z
<ChillerDragon> was about to say that
Avatar
Avatar
Jupstar ✪
wat, why did they remove it ;~;
because you don't add boost to a git repo, you just use it and add it to the dependency list
Avatar
where is the dependency then :^)
Avatar
how do you create these good looking message links?
17:36
ah
17:36
discord added a parser for them 😄
Avatar
rust programs compile faster than boost
17:59
source: gentoo user
Avatar
what, did mozilla make gentoo as well?
Avatar
sup
Avatar
Avatar
Ryozuki
rust programs compile faster than boost
the correct answer would be: Buy hardware from 2020+ 😏
Avatar
Avatar
Jupstar ✪
the correct answer would be: Buy hardware from 2020+ 😏
i disagree
Avatar
boomer
18:23
welcome to stone age
Avatar
Avatar
Jupstar ✪
if thats an argument you should never use rust xD
I heard rust build times are faster than C++ with heavy template usage
18:44
due to SFINAE
Avatar
mh i can't say. Compile times are obviously already higher bcs of the static linking. Generally coding with rust tools (the analyzer etc.) feels slower than using the same with clangd so either the tool is badly written or it has a harder time to reparse certain code snips
Avatar
Avatar
Jupstar ✪
mh i can't say. Compile times are obviously already higher bcs of the static linking. Generally coding with rust tools (the analyzer etc.) feels slower than using the same with clangd so either the tool is badly written or it has a harder time to reparse certain code snips
yeah clangd is surprisingly fast
18:55
i wonder how they differ
18:55
i know rust analyzer is like another compiler frontend
18:55
idk
Avatar
anyway
18:56
just buy better hardware is good solution
Avatar
i got 16 cores for 250€
Avatar
m1 is surprisingly fast
Avatar
nobody can tell me thats too much money xd
Avatar
nearly on par to 5800x
18:57
or on par
18:57
idk
Avatar
i wish we'd have m2 with proper software
Avatar
idk the cost ratio to a 5800x tho
Avatar
sad af
18:57
lmao
Avatar
yeah m2 is fail right
18:58
i want m1 on a linux laptop
18:58
with non propietary bloat
18:58
a completly open source processor
Avatar
i am interested so much in m2 bcs it has almost desktop class GPU and shares the memory with CPU
Avatar
but i heard it gets too hot
Avatar
so u can zero copy images etc into GPU memory
Avatar
Avatar
Ryozuki
but i heard it gets too hot
i'd give it water cooling 😂
18:59
if it wouldnt be apple
18:59
but its meant for laptops
18:59
no?
Avatar
soon they release an imac
18:59
with m2
Avatar
Avatar
Jupstar ✪
nobody can tell me thats too much money xd
all the people who have to eat for the rest of the month with 50€ can
Avatar
Avatar
Chairn
all the people who have to eat for the rest of the month with 50€ can
yayayaya
Avatar
Avatar
Ryozuki
i know rust analyzer is like another compiler frontend
llvm no?
19:01
rust analyzer emulates rustc
19:01
to find errors
19:01
A Rust compiler front-end for IDEs
19:02
rust-analyzer: building a better Rust IDE
Avatar
Avatar
Chairn
llvm no?
llvm is the backend
19:02
clang is frontend
19:02
clangd is probs rly interwined with clang
19:02
so it works fast
19:02
idk rly the ins and outs
19:04
@Jupstar ✪ making a rly good LSP is haaaard
19:04
rust analyzer has to identify broken rust code
19:04
and show what it can
19:04
autocomplete
19:04
u have to autocomplete even when u have bad code
19:04
they do some blog posts
Avatar
it also often doesnt work for me inside code inside macros :/
Avatar
This post is a direct response to Which Parsing Approach?.If you haven’t read that article, do it now — it is the best short survey o...
19:05
In this article, we’ll discuss challenges that language servers face when supporting macros.This is interesting, because for rust-analyzer, macros are ...
Avatar
Avatar
Jupstar ✪
it also often doesnt work for me inside code inside macros :/
ye macros are hard
19:05
19:05
@Jupstar ✪ last post is about macros
19:05
and why they hard
Avatar
is it really useful to keep cargo.lock on a project or you add it to gitignore ?
Avatar
if its a binary keep it
19:07
if its a library
Avatar
why that
Avatar
keep it if u want to have consistent CI
Avatar
reproducable builds
Avatar
otherwise not
Avatar
but it also sucks when u have merge conflicts
19:07
at least for npm package locks i had it few times, then u delete and recreate it xd
Avatar
Avatar
ReiTW
why that
this is for reproducible builds indeed, rust follows semver
19:08
so
19:08
if when u build the binary u want to use the frozen lockfile u use --frozen
19:08
otherwise rust may find a minor newer version on a dep
19:08
and use it
19:08
if a package follows semver this is fine
Avatar
Avatar
ReiTW
is it really useful to keep cargo.lock on a project or you add it to gitignore ?
my opinion: always add a lockfile
19:08
it gives you reproducible builds which is very nice
Avatar
A utility for managing cargo dependencies from the command line. - GitHub - killercup/cargo-edit: A utility for managing cargo dependencies from the command line.
19:09
cargo upgrade
19:09
will find new deps
Avatar
you can cargo update if you want to update your dependencies. other people using your library will ignore your lockfile
Avatar
ok ok thank you both for explaining (+ jupstar too !) (edited)
Avatar
i also have cargo install-update to manage deps
19:10
@heinrich5991 update ur deps within the semver
19:10
upgrade modifies the toml (the extension i sent)
Avatar
ye
Avatar
it also allows managing ur crate version
19:10
xd
19:10
cargo set-version --bump major
19:11
i also use cargo install-update to manage binaries installed with rust
Avatar
is there any good article/book to learn macro-magic?
Avatar
and cargo cache
Avatar
Avatar
gerdoe
is there any good article/book to learn macro-magic?
this is a thing u need to try urself too to learn
19:12
apart from reading
19:12
syn and quote ur friends
Avatar
Avatar
Ryozuki
this is a thing u need to try urself too to learn
yeah i know that i need practice
Avatar
you use syn to receive the ast tokens
19:12
and quote to easily create the generated code
Avatar
i also had a task that i wanted to do with macro derives but stuck on first steps
Avatar
Avatar
gerdoe
i also had a task that i wanted to do with macro derives but stuck on first steps
copy some existing crate doing it I guess
19:14
@gerdoe i made this useless thing back in time https://github.com/edg-l/formy
A rust derive macro to generate HTML forms from structs. - GitHub - edg-l/formy: A rust derive macro to generate HTML forms from structs.
Avatar
I think I've never had to write a non-declarative macro before
Avatar
Avatar
heinrich5991
copy some existing crate doing it I guess
oh i tried to learn something from reading alkahest macro derives but its too complicated
19:14
gave up instantly xd
Avatar
Avatar
heinrich5991
I think I've never had to write a non-declarative macro before
u mean proc macros?
Avatar
yeah im lurking around rn
19:16
thanks, cute lib xd
Avatar
its easier if you have dealt with AST before
19:16
abstract syntax trees
Avatar
like never
Avatar
fn get_meta_list(nested_meta: &syn::MetaList) -> Result<Vec<(&syn::Path, &syn::Lit)>, TokenStream> {
19:16
for example
Avatar
messed around with cpp templates and c macroproc
Avatar
syn is a crate that has most of rust ast representations
19:16
here you get a meta list
19:17
if i remember correctly its #[stuffhere]
Avatar
Avatar
Ryozuki
u mean proc macros?
ye
Avatar
this functio receives the meta list
19:17
and returns a list of paths and literals
Avatar
proc macros are cool xd u can write a completly new language in it
Avatar
paths are type symbols for example
19:17
proc macros are epic
19:17
@Jupstar ✪ proc macros are even better when the diagnostic RFC lands
19:18
it allows macros to report errors cleanly
Avatar
so i get metadata about struct/struct field and use it to do stuff right
Avatar
in that function yeah
19:18
fn get_meta_list(nested_meta: &syn::MetaList) -> Result<Vec<(&syn::Path, &syn::Lit)>, TokenStream> { let mut list = vec![]; for v in &nested_meta.nested { match v { syn::NestedMeta::Meta(m) => { if let syn::Meta::NameValue(value) = &m { list.push((&value.path, &value.lit)); } else { return Err( quote_spanned! {m.span()=> compile_error!("Must be a named value.")}.into(), ); } } x => { return Err( quote_spanned! {x.span()=> compile_error!("Invalid meta type.")}.into(), ); } } } Ok(list) }
19:18
this is my old rust code tho
19:18
not perfect
19:18
quote! allows you to construct TokenStreams
19:18
using rust syntax directly
19:19
its epic
19:19
otherwise u would need to do ugly stuff
19:19
build it manually u know
19:19
quote_spanned is like quote! but adds spans where the macro is expanded
19:19
so u see i put a compile_error!
19:19
it will show a compiler error there
19:19
if u use a wrong meta attribute
19:20
(thanks to the spans)
Avatar
here u can do anything
19:20
u can do a http request
19:21
and generate a struct from a json u received
Avatar
okey i'll try to do some kind of serialization to learn more
19:21
thanks a lot ryozoozki
Avatar
use dbg!
19:21
everywhere
Avatar
did u know about dbg?
Avatar
nope actually
Avatar
A short article about a quite unknown but useful macro in Rust.
santatrollet 1
19:21
kek
19:24
@gerdoe its hilarious cuz im doing heavy proc macro stuff at work rn
19:24
and tbh idk how it will look
19:24
we literally call libclang to parse c++ stuff and gen stuff
19:24
cxx didnt look good enough
Avatar
cxx -> c**
19:25
cжж
Avatar
sounds complicated
19:25
does it mean you parse c++ to make it rusty or something
19:26
don't get it
Avatar
you're doing c++ rust interop at work, @Ryozuki?
Avatar
heh, interesting
Avatar
im sure c++ purists would die
19:27
anyway
19:29
there is a reason why people make bindings to c and not cpp
19:29
xd
19:29
but well, using libclang, we analyze the classes etc
19:30
we store them as [x;u8]
19:30
and get the align and size
19:30
with libclang
19:30
and more weird stuff
19:30
my coworker is more c++ savy than me
Avatar
u still didnt rewrite llvm in rust?
Avatar
mhh
Avatar
i would
19:30
llvm has millions of lines
19:30
if im paid i would
19:30
it for sure would make me have a 2y job
19:30
xdd
Avatar
probably longer xd
Avatar
well depends on how useful most of the code is
19:31
maybe u make a clean version
Avatar
Avatar
Ryozuki
there is a reason why people make bindings to c and not cpp
cpp parsing is very complicated isn't it tho
19:31
cpp has so much in it
Avatar
yeah but that doesnt matter
19:31
cuz we use libclang
Avatar
name me one github project (binary) that is older than 5 years and isnt bloated 😂
Avatar
@gerdoe u dont make bindings to c instead of cpp cuz its hard to parse
19:32
its cuz c is simpler, has less edge cases, and idk seems more "stable" or smth
Avatar
c has stable abi yup
Avatar
idk if thats right
19:32
C does not have a standard ABI.Dec 20, 2010
19:33
> >
C defines no ABI. In fact, it bends over backwards to avoid defining an ABI. Those people, who like me, who have spent most of their programming lives programming in C on 16/32/64 bit architectures with 8 bit bytes, 2's complement arithmetic and flat address spaces, will usually be quite surprised on reading the convoluted language of the current C standard.
Avatar
the same so link xd
19:34
then question remains open kekw
Avatar
ws-client BOT 2023-06-08 19:51:03Z
<ChillerDragon> @Jupstar ✪ totally worth it to spend the whole day polish code snippets xd
19:51
<ChillerDragon> kinda pog that this is single line irc under the hood
19:52
<ChillerDragon> oh no robi wide snippet added the sideway scroll again xd
Avatar
Nice
Avatar
chiller
20:22
not to say anything but
20:22
the snippet is wrong
20:22
looks like u cant handle <>&
Avatar
Html moment
Avatar
chillerdragon BOT 2023-06-08 20:28:37Z
Oh no
Avatar
Use customized input tag
20:30
There u don't need these html hacks
Avatar
chillerdragon BOT 2023-06-08 20:31:03Z
Sounds good but I sleepy now
Avatar
chillerdragon: I tried doing the python module
Avatar
Avatar
Ryozuki
we literally call libclang to parse c++ stuff and gen stuff
Huh, cxx really wasn't enough?
Avatar
but I wasn't able to
Avatar
Avatar
Learath2
Huh, cxx really wasn't enough?
idk its a bit more hassle
20:33
unique ptrs everywhere u cant pass by value
20:33
with libclang we can cuz we know about the data layouts etc
20:33
also we can find if a method is inline, constexpr, etc and wrap it or etc
20:33
this is all inside a proc macro xd
Avatar
I thought the primitive types were mapped so you can pass by value
Avatar
i meant classes
20:37
i think u kinda can do in cxx if u mix cbindgen or smth
20:37
or impl the trait
20:38
i wonder how cxx works around inline methods
Avatar
hm, can you even really pass classes by value to another language? Classes are too large to really pass by value down at the ABI level
Avatar
it seems to work
20:38
on rust we just store the bytes as a array of u8
20:38
we get the align from clang
Avatar
and apply that align to the struct using some black magic?
20:39
repr(C, align(x)))
Avatar
but when it comes down to calling a c++ function on it, don't you end up having to use a pointer?
20:40
this as the first param
20:40
tbh i just kinda went with my coworker wanted to do xD
20:41
walking landmines
Avatar
anyway, becareful, it's really easy to invoke nasal demons when working at C++ in this level
20:41
he knows too
20:41
if this works
20:41
kinda deserves a blog post
Avatar
chillerdragon: couldn't figure out how to run custom code (build the rust project) using the python build stuff
20:42
so I didn't manage to do it this evening
Avatar
Avatar
Learath2
anyway, becareful, it's really easy to invoke nasal demons when working at C++ in this level
i just wish llvm was made in rust
20:43
but we cant use c++
20:43
because we need to use rust libraries
20:43
and doing this the other way around
20:43
is more hell
20:43
kek
Avatar
Avatar
Ryozuki
i just wish llvm was made in rust
make it in rust
Avatar
So wait, you said passing classes by value, for member functions that's not the case, they use a pointer at the abi level. For normal functions I thought that entailed a copy or move to the stack
Avatar
I think larger structs are passed by pointer
Avatar
Avatar
Learath2
So wait, you said passing classes by value, for member functions that's not the case, they use a pointer at the abi level. For normal functions I thought that entailed a copy or move to the stack
i mean
20:45
imagine u have a class and constructor
20:45
we call it
20:45
the instance of the class
20:45
we store it by value on rust side
20:45
for method calls it seems to accept a pointer on *this yeah
20:45
atleast on linux and macos
20:45
xd
20:46
we didnt go to windows hell
Avatar
Ah, I think I understand what you mean, and libclang darkmagic gives you the alignment and size you need to allocate on the rust side for the new object
Avatar
also macos seems to put __ before symbols or smth
20:46
weird stuff
Avatar
Avatar
Learath2
Ah, I think I understand what you mean, and libclang darkmagic gives you the alignment and size you need to allocate on the rust side for the new object
ye
20:47
let me copy some stuff
Avatar
I guess cxx instead let c++ do the allocations
Avatar
ye
Avatar
Avatar
heinrich5991
chillerdragon: couldn't figure out how to run custom code (build the rust project) using the python build stuff
anyone experience with python packaging? ^^
Avatar
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
20:48
@Learath2
20:48
cargo expand
20:48
of the proc macro
20:48
well this is a bit older version
20:49
we now wrap automatically inline functions
20:49
and something with placement new
20:49
i forgot
20:50
extern "C" void wrap___ZN4mlir19registerAllDialectsERNS_11MLIRContextE(mlir::MLIRContext & context) { return registerAllDialects(context); } extern "C" void wrap___ZNK4mlir8Location4dumpEv(mlir::Location self) { return mlir::Location::dump(self); } extern "C" void wrap___ZN4mlir7BuilderC1EPNS_11MLIRContextE(mlir::MLIRContext * context) { new(context) mlir::Builder(context); return; } the last method
20:50
is a inline constructor
20:50
builder
Avatar
Excellent mangling btw 😄
20:51
anyway its interesting for sure
Avatar
A decade looking at this language and it still takes me so long to decode them
Avatar
which is why i love this current job
20:51
even if i could have more paying
20:51
but i doubt i can do this crazy stuff elsewhere easily
Avatar
Avatar
Learath2
A decade looking at this language and it still takes me so long to decode them
xd
20:52
@Learath2 did u look at rust mangling
20:52
u get 100+ names
Avatar
Haven't yet, sounds excellent
20:53
from the blog post from yesterday
20:53
its not all the name
20:53
Avatar
Do you know which language has amazing mangling?
20:53
C
20:53
none
Avatar
C ofc ❤️
Avatar
Avatar
Learath2
Do you know which language has amazing mangling?
Does c literally guarantee no mangling? I mean if a compiler would generate it, would it leave c standard xd
Avatar
no, it wouldn't
21:03
msvc mangles the names a litle
Avatar
Msvc is probably not the best example😂😂😂😂
21:04
But good to know
Avatar
C doesn't care
Avatar
theorically rust either
21:26
but the only impl does it
21:26
kek
21:38
9c52ab0 Add better translation support for "Settings and Commands" page on the wiki - Zwelf cce80db Merge pull request #45 from Zwelf/pr-wiki-settings-translation - def-
Avatar
huh russian cpp community shared deen's article about haskell
21:47
unexpected
Avatar
This can happen with the following server configuration: sv_solo_server 1 sv_vote_kick_delay 10 Steps to reproduce 1. Vote a map 2. Let the vote fail 3. Attempt to kick a player !image Expected behavior It should instead say "You can kick only your team member" because you can't kick others on a solo server.
Exported 1,049 message(s)