Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories ā€” IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2021-07-28 00:00:00Z and 2021-07-29 00:00:00Z
Avatar
i think it would be cool if we could defer some skins to lazyload
00:53
that way players can still download a bunch of skins but not affect load time
00:53
maybe if we create a subdirectory in skins called "lazyload" those can be deferred
00:54
that way the client could still block to load common skins into memory
00:54
let me know what you guys think about this
00:55
or the subdirectory can be simply called "defer"
00:56
if we want to not be too technical for anyone digging around, it could also be called something like "extra" or "user" but i think it's nice to be transparent like this despite being a bit technical
00:58
OR big brain idea, new directory entirely called downloadedskins but i think that is too correlated with downloadedmaps and not the same process (edited)
00:59
and you could browse the skin db in-game and download them that way, and then the name of the folder is more correct + helpful
Avatar
downloadedskins is already the place for the auto skin downloader (edited)
Avatar
ppl keep talking about the auto downloader but i swear ive never seen it
02:16
probably a good indication of bad UX xd
Avatar
tee -> download skins
Avatar
Avatar
plsplsplslol
tee -> download skins
im not sure, is it supposed to show here?
02:19
i already checked cl_download_skins to make sure it's 1 and
02:19
cl_skin_download_url is https://skins.ddnet.tw/skin/
Avatar
oh the checkmark
02:20
so that's supposed to sync my skins with the db?
02:20
does that happen every launch?
Avatar
every time someone on ur server changes skin i think
Avatar
no its just when someone uses the skin
02:20
what happened to the bottom of ur skins page
Avatar
ohh okay i understand
02:20
it's a bug with ui_scale
02:20
basically dont use anything larger than 1
02:21
cus nothing works for it lol
02:21
rip anyone with bad vision like me i guess
Avatar
use irl zooz
Avatar
i do use irl zooz but my eyes are still bad and prefer large text
02:21
imo these should be grouped differently
02:21
the order at least is pretty confusing
02:22
maybe download skins should be in its own column
02:22
or dummy settings actually in its own column
šŸ˜‹ 1
02:22
since it's not an option it's a toggle
Avatar
Colo-Colo:
Avatar
abcqwerty:
Avatar
chillerdragon BOT 2021-07-28 07:59:32Z
when does one delete passwort reset tokens from the database?
08:00
I mean yea when they are used. But I feel like every coding tutorial out there leaves unused tokens dangeling forever
08:00
what is recommended a cron job that wipes old tokens? Or on a new request clear all old tokens.
Avatar
chillerdragon
08:02
if u use something like uuids for tokens
08:02
or the token is long enough
08:02
its rly hard to get a token like this
08:02
again
08:02
so it doesnt matter
08:02
and u can keep it for auditing
Avatar
chillerdragon BOT 2021-07-28 08:02:49Z
ah no its not about security more about housekeeping
Avatar
auditing i guess
Avatar
chillerdragon BOT 2021-07-28 08:02:57Z
i feel like my database gets spammed when people mess with it
Avatar
chillerdragon BOT 2021-07-28 08:03:05Z
so its a audit feature to keep it forever?
08:03
not a DoS bug
08:03
you can build ur app logic to allow reset after x days of resetting i guess
08:03
or just delete it
08:03
idk
08:04
i dont think a db row with a token and a timestamp uses much space
Avatar
chillerdragon BOT 2021-07-28 08:05:00Z
space is probably fine i am just too noob with databases to understand lookup times
08:05
when and how tho? (@Ryozuki)
or just delete it
Avatar
delete it when its used?
Avatar
chillerdragon BOT 2021-07-28 08:07:36Z
and the unused ones?
Avatar
chillerdragon BOT 2021-07-28 08:07:44Z
lets say one dude spam creates tokens and never uses them
Avatar
then after some time i guess
Avatar
chillerdragon BOT 2021-07-28 08:07:55Z
and who runs the code?
Avatar
chillerdragon BOT 2021-07-28 08:08:00Z
a cronjob or on a request?
Avatar
on my app i have a thread
Avatar
chillerdragon BOT 2021-07-28 08:08:17Z
so a sidejob
Avatar
chillerdragon BOT 2021-07-28 08:08:21Z
in the app is cool yea
Avatar
Avatar
chillerdragon
space is probably fine i am just too noob with databases to understand lookup times
Extremely fast, way faster than needed unless you host a very large site
Avatar
chillerdragon BOT 2021-07-28 08:08:36Z
yea thought so
08:08
i mean nobody aint gonna never reset any no passwords on mi site anyways
Avatar
ur table is pros user_id token and timestamp, just add a index to token
08:08
and ur good to go
Avatar
chillerdragon BOT 2021-07-28 08:09:04Z
im just wondering what the good style is
Avatar
probs*
Avatar
You can also have a hash column in mysql to get o(1) lookups
Avatar
chillerdragon BOT 2021-07-28 08:09:47Z
same in sqlite?
08:09
too lazy to run a mysql server
Avatar
postgres best
Avatar
Idk if sqlite has hash columns but it can definitely have indexes which will give you o(logn) lookup. Definitely good enough until very large n
Avatar
chillerdragon BOT 2021-07-28 08:10:47Z
o(1) lookup sounds unrealisitic tbh :D
08:10
i know database coders are wizards but how
08:12
does something speak against redis?
Avatar
chillerdragon wants to optimize for millions of users when he is the only one using it feelsbadman
Avatar
Well it is O(n/k) on average where k is the average bucket size
Avatar
i think redis is for distributed caching right
08:12
i prefer having caching inside ur app if ur not gonna make it distributed
Avatar
chillerdragon BOT 2021-07-28 08:12:36Z
i have no clue what redis is for
Avatar
redis should have similar performance to a mysql hash column but its in memory so that should help
Avatar
its a in memory db
Avatar
chillerdragon BOT 2021-07-28 08:12:41Z
but i have it in my codebase already
Avatar
what r u doing btw?
Avatar
Redis is an in memory blazing fast key value store
Avatar
chillerdragon BOT 2021-07-28 08:13:22Z
passwort reset for teewoods game server accounts
Avatar
teewoods
08:14
wat dat
Avatar
Redis is good for caching stuff too
08:14
i use redis for authed sessions
08:15
followed some soydev nodejs tut :D
Avatar
i think using redis is a overkill
08:15
what lang are u using
Avatar
chillerdragon BOT 2021-07-28 08:15:24Z
it werks
08:15
i should rewrite in bash
08:15
nodejs is bloat
Avatar
use rust
Avatar
chillerdragon BOT 2021-07-28 08:16:04Z
rust too hard
Avatar
i wonder
Avatar
chillerdragon BOT 2021-07-28 08:16:50Z
but if redis is only key and value i feel like i miss a column
08:16
userid, token, expiredate
08:17
key can be ur token
Avatar
chillerdragon BOT 2021-07-28 08:17:06Z
or do i abuse the value to store multiple values
Avatar
then a json object with userid and expiredate
08:17
thats how i would do it
Avatar
chillerdragon BOT 2021-07-28 08:17:19Z
i see
08:17
hack
08:17
its the most logical way
08:17
nobo
Avatar
chillerdragon BOT 2021-07-28 08:17:36Z
sorry 5head
Avatar
but will u rly store
08:18
that in redis?
08:18
does ur redis persist
08:18
data
Avatar
chillerdragon BOT 2021-07-28 08:18:45Z
tbh i have no clue wat my redis does
Avatar
redis is a database
08:19
but only in memory
08:19
once u shutdown redis
08:19
u lose all
Avatar
chillerdragon BOT 2021-07-28 08:19:13Z
but since i went through the trouble of apt install redis-server and redis-server & i might as well use it
Avatar
thats why its good for caching stuff
Avatar
chillerdragon BOT 2021-07-28 08:19:35Z
its an actual server running
Avatar
but not for storing data meant for long time
Avatar
chillerdragon BOT 2021-07-28 08:21:04Z
yea those tokens are not meant for long time right? :D
Avatar
Why are JWTs so popular...
Avatar
chillerdragon BOT 2021-07-28 08:22:13Z
some tut mentiont JWT i never heard of it
Avatar
Why would you want to store outdated data on the users browser even if you can trust that it's not fake?
Avatar
chillerdragon BOT 2021-07-28 08:23:09Z
?xd
Avatar
JWTs are signed cookies basically. They contain user information. The user sends them instead of some short random token and you can use the data inside the token
08:24
Which sounds like a good idea, until you want to ban people
Avatar
chillerdragon BOT 2021-07-28 08:24:59Z
so when the user changes browser tokens get invalid
Avatar
chillerdragon BOT 2021-07-28 08:37:27Z
oh yikes so redis fills my ram
08:37
i got 86 session tokens already from a unused site
08:37
that seems wrong
Avatar
Avatar
Learath2
Which sounds like a good idea, until you want to ban people
?
08:41
its not a bad idea, u just dont store the is banned info in the token
Avatar
chillerdragon BOT 2021-07-28 08:42:17Z
i have more diskspace than ram
08:42
ah u on JWT
Avatar
chillerdragon im using jwt, i use a long lived token called "refresh token" its stored in a http only cookie, which means js cant access it, when you login the server sets this http only cookie
08:42
then the client calls a refresh endpoint and gets a session token
08:42
which lasts e.g 15 mins
08:43
this token can be read by javascript
08:43
and u need to use it on api calls
Avatar
chillerdragon BOT 2021-07-28 08:43:41Z
http only cookie sounds neat so no js code can steal it
08:43
never heard of that either
Avatar
chillerdragon BOT 2021-07-28 08:43:50Z
gosh my web knowledge is so little
Avatar
Avatar
Ryozuki
its not a bad idea, u just dont store the is banned info in the token
Which means you need a roundtrip to the db anyway. Might aswell get the entire user object
08:53
i only store the id
08:53
u can cache it
Avatar
I guess just the id would work. One less mapping to look up
11:43
Iā€™m a designer, writer, filmmaker, & cyclist that loves typography and lives in Denver, Colorado.
Avatar
i actually dont hate comic code
11:48
cascadia code is one of my favorite fonts
11:49
but i use fira code bolded right now
Avatar
i use jetbrains mono
Avatar
dejavu sans mono or bust
Avatar
i like jetbrains mono but it feels too squishy to me
11:53
dejavu sans mono is pretty nice
11:55
my eyes are just so used to fira lol
Avatar
rsync over a 1g connection is so much more pleasant
12:16
I should have been born in south korea where 1g home connections are common šŸ˜¦
Avatar
(Just observing the terminal where the rsync is happening I transferred about a gigabyte of logs over ssh šŸ˜„ )
Avatar
I have a bit of a playful font as well
12:30
image.png
Avatar
looks like operator mono but idk
Avatar
chillerdragon BOT 2021-07-28 13:12:26Z
Pff you all mainstream with your fixed with fonts and IDE's and vim
13:12
image.png
13:12
I use LibreOffice Writer like real OGs do
13:16
Edit: Pff you all mainstream with your fixed width fonts and IDE's and vim
Avatar
nice edit xd
13:20
as i know it possible to edit webhook messages
Avatar
Avatar
chillerdragon
image.png
Here on out you are banned from contributing to ddnet
Avatar
strange bridge bot
15:50
ipv4 gg
15:50
We have tried hard to avoid passing on these higher prices to our customers, and have acceped the economic loss until now. However, the prices have increased so dramatically that we can no longer do this. We unfortunately must increase our prices.
15:51
Avatar
152ā‚¬ setup fee, damn
Avatar
and my isp still has no ipv6 support
15:53
15:55
im sure this can increase to 80% with major isps getting it
15:55
since in most countries nearly everyone uses 2-3 isps
15:55
different*
Avatar
When opening a chat and clicking on a certain button, a menu will pop up, as when choosing who to watch, it will help to substitute a nickname, what do you think? This will simplify the input for beginners, as it is visually easier and will also help when choosing a unicode nickname, since the shift+tab on the steam version causes problems, because people are too lazy to change the keyboard shortcuts in the steam ![selectspec](https://user-images.githubusercontent.com/33897884/127367819-bdab...
Avatar
chillerdragon: this is the most cursed shit i have seen
18:09
and it'
18:09
it's not even monospace
18:10
can the bridge handle edits and replies yet?
18:10
or is that not a thing
Avatar
Avatar
Ryozuki
and my isp still has no ipv6 support
i think xfinity has had it for a while, so my ipv4 is kinda generated on a need basis
18:10
or calculated somehow, i really cant remember how it works
Avatar
chillerdragon BOT 2021-07-28 21:48:41Z
I can reply, edit and see your edits but I can sadly not see your replys :( (@lynn)
can the bridge handle edits and replies yet?
Avatar
ohh okay thx
22:00
ill quote the message instead then
Exported 213 message(s)