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-07-10 00:00:00Z and 2023-07-11 00:00:00Z
Avatar
Avatar
nouaa
LUL
w rizz
f3 1
Avatar
845142c M CtS, M Adorenarine - ddnet-maps
Avatar
Avatar
Ewan
if i had a nickel
nobody has nickels now
06:15
new comment i made
Avatar
Avatar
Ryozuki
new comment i made
Everyone own idea 😬😬
Avatar
need a vote
Avatar
As If ppl understand the pros and cons xd
Avatar
I think my approach is a superset of centralized accounts for ddnets only.. so we could start with that 😬
07:04
Just wait for ddnet in rust and sell it as ddnet 2.0
Avatar
i wouldnt mind doing the backend
07:05
the auth sc
07:05
sv
07:05
we all know its gonna be in rust anyway
07:06
gigachad
Avatar
I just dislike that a mod has to download a list of known users and their keys xd
07:06
it would be cool with gog
07:07
gpg
07:07
just let ddnet sign ur key
07:07
then u dont need verify
07:07
download
07:07
*
Avatar
KISS
Avatar
oh well u need to get the account info still
07:08
lets use zero knowledge proofs
07:08
u dont even need to send keys
07:09
gigachad
07:09
In cryptography, a zero-knowledge password proof (ZKPP) is a type of zero-knowledge proof that allows one party (the prover) to prove to another party (the verifier) that it knows a value of a password, without revealing anything other than the fact that it knows the password to the verifier. The term is defined in IEEE P1363.2, in reference to ...
07:10
A common use of a zero-knowledge password proof is in authentication systems where one party wants to prove its identity to a second party using a password but doesn't want the second party or anybody else to learn anything about the password. For example, apps can validate a password without processing it and a payment app can check the balance of an account without touching or learning anything about the amount.[1]
Avatar
So basically like a public key
Avatar
with pubkeys you don't need passwords 😉
07:11
but yes, this is the next best thing if one wanted to have passwords
Avatar
rsa auth is kind of zk i think xd
Avatar
not sure
07:14
the "zero knowledge" in "zero-knowledge proofs" is quite strong
Avatar
Pairing-based cryptography is the use of a pairing between elements of two cryptographic groups to a third group with a mapping e : G 1 × G 2 → G ...
07:14
its listed under zk
07:14
hmm
07:15
Zero knowledge typesEdit
Proof of knowledge: the knowledge is hidden in the exponent like in the example shown above. Pairing based cryptography: given f(x) and f(y), without knowing x and y, it is possible to compute f(x×y). Witness indistinguishable proof: verifiers cannot know which witness is used for producing the proof. Multi-party computation: while each party can keep their respective secret, they together produce a result. Ring signature: outsiders have no idea which key is used for signing.
07:15
mobile sucks
Avatar
where can I find the quote?
Avatar
In cryptography, a zero-knowledge proof or zero-knowledge protocol is a method by which one party (the prover) can prove to another party (the verifier) that a given statement is true, while avoiding conveying to the verifier any information beyond the mere fact of the statement's truth. The intuition underlying zero-knowledge proofs is that it ...
07:19
under the types section
Avatar
I don't understand the article well enough to conclude that RSA falls under it or not
07:21
however, I note that RSA is not mentioned in "Pairing-based cryptography"
Avatar
true xd
08:17
found this walking
08:18
imagine going out of ur house tho
08:18
justatest
Avatar
ws-client BOT 2023-07-10 08:30:42Z
<Jupstar> in crypto we rust
Avatar
Avatar
Jupstar ✪
I just dislike that a mod has to download a list of known users and their keys xd
This is why only 2 people use gpg. It's very meh design for normal people
09:07
I wouldn't consider RSA 0 knowledge but it is effectively 0 knowledge until someone finds a way to factor large primes
Avatar
Avatar
Jupstar ✪
So basically like a public key
imagine learning ur private key
10:00
giga_chad
Avatar
Let's just delay the account stuff until quantum computers are good enough that we can say. It's not secure sty
10:03
Sry
Avatar
Avatar
Ryozuki
oh well u need to get the account info still
Or you can just memorize all your friends pubkeys and we only display pubkeys. "Oh there you are a173b5f82gf72e41ebc7aff"
Avatar
ChillerDragon BOT 2023-07-10 10:05:51Z
:p
Avatar
im making a blog post
11:03
on implementing a hash map
Avatar
put a hash table as table of content
Avatar
Avatar
Ryozuki
on implementing a hash map
do share 🙂
Avatar
ws-client BOT 2023-07-10 11:31:14Z
<Jupstar> what would you do if a std macro behaves different from it's description from the docs?
11:33
<Jupstar> @Ryozuki if the docs are a subset of what the implementation is actually doing, would u consider it safe to rely on the superset xD
Avatar
idk xd
11:34
what docs
11:34
what macro
Avatar
Avatar
heinrich5991
do share 🙂
ill do when its done ye
Avatar
ws-client BOT 2023-07-10 11:34:25Z
Inspects an environment variable at compile time.
11:34
<Jupstar> env!
Avatar
report a bug, likely
Avatar
ws-client BOT 2023-07-10 11:34:35Z
<Jupstar> says its "yielding an expression of type &'static str"
Avatar
what's the behavior differential
Avatar
whats not doing?
Avatar
ws-client BOT 2023-07-10 11:34:41Z
<Jupstar> but in fact it yields a string literal
11:34
<Jupstar> and i need a string literal in this case xd
Avatar
a string literal is an expression of type &'static str
11:35
yeah
Avatar
ws-client BOT 2023-07-10 11:35:06Z
<Jupstar> no
Avatar
not the other way aroudn though
Avatar
ws-client BOT 2023-07-10 11:35:18Z
<Jupstar> well ok
Avatar
&'static str is a string literal lol
Avatar
no
11:35
you can also reach it differently
11:35
String::leak, e.g. (edited)
Avatar
im confused
11:36
whats the exact type u need
Avatar
a string literal
Avatar
ws-client BOT 2023-07-10 11:36:14Z
<Jupstar> a string li
Avatar
for a macro, likely
Avatar
ws-client BOT 2023-07-10 11:36:18Z
<Jupstar> basically "hi"
Avatar
ws-client BOT 2023-07-10 11:36:25Z
<Jupstar> yes
11:36
<Jupstar> for another macro
Avatar
Jupstar: create a PR to add "string literal" to the doc of env!
11:36
profit
Avatar
well the docs are correct
Avatar
ws-client BOT 2023-07-10 11:37:01Z
<Jupstar> they are not incorrect xD
Avatar
Jupstar just wants more guarantees
11:37
than they give
11:37
i get it now
11:37
well its better its actually a string literal
Avatar
yes
Avatar
and i think the guarantee is there
11:37
because changing would be a breaking change
Avatar
ws-client BOT 2023-07-10 11:37:56Z
<Jupstar> well rust has no spec yet right?
Avatar
hmm. to be on the safe side, you should probably add it to the docs
Avatar
but it has a backwards compat promise
Avatar
theoretical breaking changes that affect no one are sometimes done
11:38
I guess this one is widely used already, though, so you should be fine
Avatar
If a crate compiled at some point, then Rust's stability guarantees say that it'll still compile afterwards.
11:39
the editions fix that
11:39
"breaking" changes are done on editions
Avatar
I'm sure that this has been broken several times already
Avatar
but they are mild
11:39
so old crates use old editions
11:39
they still compile
11:39
with newer
Avatar
note also the future-incompatibility warnings
👆 1
11:39
that you get these days
Avatar
i dont think they will downgrade env
11:39
to a non literal
11:39
anyway
Avatar
me too
11:40
just saying that the guarantees aren't as absolute as you make them to be
Avatar
ws-client BOT 2023-07-10 11:44:04Z
<Jupstar> is just the questions are environment variables always string literals?
11:44
<Jupstar> "value of the named environment variable at compile time"
11:44
<Jupstar> then i dont need to pr
11:44
<Jupstar> xd
Avatar
not really
Avatar
ws-client BOT 2023-07-10 11:48:09Z
<Jupstar> what else can they be then? just wondering
11:48
<Jupstar> bcs i bet the maintainers will argue like that
Avatar
it could be an expression of that type
11:54
e.g. {"abc"}
11:54
or {static VALUE: &str = "abc"; VALUE}
11:54
the rust maintainers are generally not opposed to improving documentation
11:54
they might be opposed to adding more guarantees, but I don't think they will be in this case
Avatar
Avatar
heinrich5991
note also the future-incompatibility warnings
e.g. stuff like this: warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0
11:56
@Ryozuki ^
Avatar
ws-client BOT 2023-07-10 11:56:48Z
<Jupstar> i have never seen a environment variable holding an expression as value. But is the question is rust itself defines a value of a environment variable a string literal
Avatar
I think we're talking past each other
11:57
I mean the macro could expand to something like this when the environment variable has abc as its value (edited)
Avatar
ws-client BOT 2023-07-10 11:58:35Z
<Jupstar> Oh, i simply meant bcs the doc says "This macro will expand to the value of the named environment variable at compile time". So i wondered if this is guarantee enough, as in "A value of a named env var is ALWAYS a string literal"
Avatar
{"abc"} also suffices that guarantee
11:59
(if the environment variable's value is abc)
12:00
anyway
Avatar
ws-client BOT 2023-07-10 12:00:14Z
<Jupstar> but is that THE value of the env var xD
Avatar
sure
12:00
anyway, I think you can get away with relying on it without a PR, too
Avatar
ws-client BOT 2023-07-10 12:01:01Z
<Jupstar> i'll test once gcc has rust backend 😂
Avatar
ws-client BOT 2023-07-10 12:13:59Z
<Jupstar> i wonder if i could write a game in vulkan inside a proc macro or if there is any limitation
Avatar
a proc macro is a full-blown rust program
Avatar
derive macros are where rust macros shine
12:22
macro_rules only generates code
12:22
derive macro transforms code
12:22
proc macro is a derive macro
Avatar
a derive macro is a proc macro
12:22
not the other way around, I think
Avatar
true xd
Avatar
ws-client BOT 2023-07-10 12:24:16Z
<Jupstar> funny. imagine u compile ddnet and while compiling u can play ddnet
12:24
<Jupstar> xd
12:39
xd
12:39
sometimes i cringe myself reading myself
12:45
@heinrich5991 remember the issue we talked in the past
12:45
about quadratic probing
12:45
there are certain quadratic polynomials that do a full cycle
12:45
or so i read
12:46
h(k) + (i + i^2) / 2
12:46
12:46
picture for math
12:47
ah well
12:47
idk
12:47
xDD
12:48
but apparently the quadratic function is arbitrarely chosen
12:48
i wonder if there is a ist of good ones
12:48
list
Avatar
i wanna post this on the rust reddit
12:56
but im afraid of having done smth wrong
12:56
im no expert xd
12:56
dont wanna be shamed
12:56
justatest
Avatar
it's fine. they won't shame you. not sure whether they'll give you attention though, which can be even worse
Avatar
Avatar
Ryozuki
dont wanna be shamed
Use fake account
12:57
Fake blog
Avatar
Avatar
heinrich5991
it's fine. they won't shame you. not sure whether they'll give you attention though, which can be even worse
i had good experiences in the past
12:57
all the posts i put reached frontpage
12:57
xd
12:57
ill just do it
Avatar
you forgot #![deny(unsafe)] though
Avatar
meh its ok
12:58
there is no unsafe
12:58
xd
12:58
justatest
12:59
linear probing 10 time: [255.08 ns 256.75 ns 258.66 ns] quadratic probing 10 time: [252.66 ns 252.96 ns 253.25 ns] linear probing 100 time: [3.7110 µs 3.7169 µs 3.7236 µs] quadratic probing 100 time: [3.6763 µs 3.6783 µs 3.6803 µs] linear probing 1000 time: [32.555 µs 32.703 µs 32.906 µs] quadratic probing 1000 time: [32.002 µs 32.046 µs 32.126 µs] linear probing 10000 time: [464.28 µs 464.39 µs 464.53 µs] quadratic probing 10000 time: [453.38 µs 454.40 µs 455.71 µs] linear probing 100000 time: [6.4169 ms 6.4213 ms 6.4267 ms] quadratic probing 100000 time: [6.3506 ms 6.3548 ms 6.3601 ms]
12:59
these are my bench
Avatar
pub type Hashmap<k,v>=std::collections::hashmap<k,v>
Avatar
but idk maybe simd or smth makes quadratic faster
Avatar
No troll no life
Avatar
did you compile with -march=native -mavx2 ?
Avatar
@Ryozuki (from what i have seen) capitalize the I
Avatar
i hate that
13:01
from english
13:02
fixed
Avatar
no one cares about lowercase i lol
Avatar
Avatar
Ryozuki
but idk maybe simd or smth makes quadratic faster
I thought quadratic probing was mostly used to avoid "clumping"
Avatar
i sure dont care
Avatar
Quadratic probing can be a more efficient algorithm in an open addressing table, since it better avoids the clustering problem that can occur with linear probing, although it is not immune. It also provides good memory caching because it preserves some locality of reference; however, linear probing has greater locality and, thus, better cache performance
Avatar
Avatar
Learath2
I thought quadratic probing was mostly used to avoid "clumping"
seems true
Avatar
Avatar
Ryozuki
fixed
in case you care about another typo: Wehther -> Whether
Avatar
i do care
Avatar
Avatar
Ryozuki
Quadratic probing can be a more efficient algorithm in an open addressing table, since it better avoids the clustering problem that can occur with linear probing, although it is not immune. It also provides good memory caching because it preserves some locality of reference; however, linear probing has greater locality and, thus, better cache performance
As a closed addressing enjoyer I don't have such problems gigachad
Avatar
Avatar
Learath2
As a closed addressing enjoyer I don't have such problems gigachad
linked list enjoyer justatest
Avatar
nice blog btw :)
Avatar
Avatar
Ryozuki
linked list enjoyer justatest
I'm being ostracized for enjoying the classics
Avatar
Avatar
Patiga
nice blog btw :)
ty!
Avatar
residuez requires Signal Processing Toolbox.
pepeW
13:09
I have so many toolboxes
Avatar
whats that
Avatar
matlab stuff?
Avatar
Yes, matlab
Avatar
say no more
13:12
:p
Avatar
My computer feels dirty now
Avatar
now that i reread
13:15
i could refactor most code into find_slot_idx so the non mut and mut functions are small
13:15
and also the quadratic thing
13:16
maybe another day im feeling lazy now xD
Avatar
Thanks proprietary shitware, very cool
Avatar
>something unexpected
13:27
they are incompitent
Avatar
and there are no logs
13:28
I tried again and it just worked, thanks proprietary shitware
Avatar
I hate references like this, the book is 900 pages, where am I supposed to look?
Avatar
its cuz they dont use latex
Avatar
Avatar
Learath2
I tried again and it just worked, thanks proprietary shitware
is the thing u making not deterministic?
13:52
random? xd
Avatar
I was trying to install a matlab addon, so no it's not supposed to be non-deterministic 😄
Avatar
@deen u work in databases with dataflow stuff?
14:00
maybe u interested in this
14:00
Hydro's low-level dataflow runtime. Contribute to hydro-project/hydroflow development by creating an account on GitHub.
Avatar
Yeah, sounds cool and pretty similar to the timely+differential dataflow we use
Avatar
has anyone here used racket
Avatar
no but i hear it often
14:38
functional
Avatar
i have to use it for a placement and its giving me brain damage feelsbadman
14:46
learn it a lot
14:46
i need more excuses to learn more langs
14:47
xd
14:47
otherwise im lazy and dont
Avatar
learn a lang in non-english syntax
Avatar
Avatar
louis
has anyone here used racket
hypervomit
14:58
I helped friends of mine study for a racket exam, honestly by far the worst way to teach programming, if you are going to be forcing students to start with a functional language atleast make it something relevant like Haskell
14:58
What is the point of teaching a dead lisp?
14:59
Well not dead, but it's only used by weird professors and their weird professor friends to do weird professor things
Avatar
yeah the professor of the class is one of the dudes who was involved with some aspect of development
Avatar
Not surprised at all
Avatar
it seemed like the lang was supposed to somewhat simulate how computer hardware works or smth
15:01
but the syntax makes me want to kms
Avatar
If your language has less than 100 users you shouldn't be allowed to teach it as a beginner course
Avatar
Avatar
louis
but the syntax makes me want to kms
That's what Lisplikes do to you
Avatar
Avatar
louis
it seemed like the lang was supposed to somewhat simulate how computer hardware works or smth
I mean, it's not even close to how the underlying hardware runs your code. Functional programming languages are how computer science professors wish programming looked like so they can use their fancy math tools instead of learning ours.
Avatar
but isnt lisp the best lang
Avatar
(It does work to some degree, look at haskell, you can even mathematically prove stuff about haskell programs)
Avatar
fans of lisps are die hard
15:04
harder than rust
15:05
the cto of my company loves lisp
15:05
but i dont think he uses it on projects xd
Avatar
(+ 1 2 3 4) my favourite way to write 1 + 2 + 3 + 4, very intuitive
Avatar
@deen would like to interject?
15:05
i think deen likes lisp
Avatar
they have me making lists using nested constructors greenthing
Avatar
I have never used a lisp 😄
Avatar
@deen is a haskell enjoyer iirc
Avatar
(cons "A" (cons "B" (cons "C" '())))
Avatar
@louis try leanring erlang lololo
15:06
it also got ugly af syntax
15:07
well not as ugly as that
Avatar
it probably doesnt end up with )))})) at the end of a line lol
Avatar
-module(series). -export([fib/1]). fib(0) -> 0; fib(N) when N < 0 -> err_neg_val; fib(N) when N < 3 -> 1; fib(N) -> fib_int(N, 0, 1). fib_int(1, _, B) -> B; fib_int(N, A, B) -> fib_int(N-1, B, A+B).
Avatar
Avatar
Ryozuki
-module(series). -export([fib/1]). fib(0) -> 0; fib(N) when N < 0 -> err_neg_val; fib(N) when N < 3 -> 1; fib(N) -> fib_int(N, 0, 1). fib_int(1, _, B) -> B; fib_int(N, A, B) -> fib_int(N-1, B, A+B).
when N < 3?
15:08
more like when N < 2
15:08
oh it's fibonacci, not factorial 😄
Avatar
no i think its saying 0,1,1
15:08
lol
Avatar
People who enjoy Lisp also enjoy stuff like lambda calculus
Avatar
-define(IP_VERSION, 4). -define(IP_MIN_HDR_LEN, 5). DgramSize = byte_size(Dgram), case Dgram of <<?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16, ID:16, Flgs:3, FragOff:13, TTL:8, Proto:8, HdrChkSum:16, SrcIP:32, DestIP:32, RestDgram/binary>> when HLen>=5, 4*HLen=<DgramSize -> OptsLen = 4*(HLen - ?IP_MIN_HDR_LEN), <<Opts:OptsLen/binary,Data/binary>> = RestDgram, ... end.
15:09
erlang has a neat feature tho
15:09
bit manipulation
Avatar
Avatar
Learath2
People who enjoy Lisp also enjoy stuff like lambda calculus
lambda calculus is the most simple turing complete language
15:11
based
Avatar
unbased, it gives me a headache
15:19
someone downvoted me (edited)
15:19
KEKWWA
Avatar
9th post in r/rust frontpage
Avatar
reddit famous poggers
15:39
Avatar
Avatar
Voxel
no one cares about lowercase i lol
i do
Avatar
Rewind one unicode codepoint instead of rewinding only one character (byte) when text does not fit. Closes #6810. Screenshots:
  • Before:
!screenshot_2023-07-10_17-54-21
  • After:
!screenshot_2023-07-10_17-51-37

Checklist

  • [X] Tested the change ingame
  • [X] Provided screenshots if it is a visual change...
15:57
robyt god
16:06
after unsuccessful update
Avatar
I recommend to have it on steam and keep it updated that way
16:42
To ensure for no problems
Avatar
chillerdragon BOT 2023-07-10 16:48:52Z
Posting links without context is a mutable offense. When a discord mod sees this he will censor you! (@heinrich5991)
16:49
cool blog tho I rate 7/10
Avatar
what about mine chillerdragon
Avatar
01e4eb1 Fix text wrapping with long Unicode strings - Robyt3 dd09ac9 Merge #6826 - bors[bot]
Avatar
Avatar
Chairn
redownload client from https://ddnet.org/downloads/
I know the solution to the problem, but I think for beginners it can cause problems
18:35
why interrupted update breaks the client
Avatar
another interesting data structure to code? if its not trees better
18:40
maybe a rope
18:40
fck a rope is a tree
18:40
everything is a tree
18:41
i am a tree
Avatar
looks interedting nonetheless
Avatar
where u see this structure
Avatar
if nothing else comes up next is ropes
18:42
@Ewan any editor thats somewhat good
18:42
ropes are good to handle text
18:42
In computer programming, a rope, or cord, is a data structure composed of smaller strings that is used to efficiently store and manipulate a very long string. For example, a text editing program may use a rope to represent the text being edited, so that operations such as insertion, deletion, and random access can be done efficiently.
18:43
I just didn’t know which one you were talking about
18:43
for a moment
Avatar
whats the other one
18:43
?
Avatar
I didn’t know which data structure you were talking about
18:44
there was no other one
18:44
sry
18:44
I just got out of dentist
Avatar
chillerdragon BOT 2023-07-10 18:47:53Z
Didn’t click sry couldn’t care less about rust hashmaps.OwO (@Ryozuki)
what about mine chillerdragon
Avatar
Closes #6782.

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
e0cc11e Rename variables tile to Tile - Robyt3 756740e Fix hook-through not being fully removed when filling selection - Robyt3 96cc09b Merge #6827 - bors[bot]
Avatar
Hello, I worked on a client side little addition to nameplates : a rank indicator that shows if a player has ever crossed the finish line of the current map (see in picture). Is this kind of feature worth to submit on ddnet Github ?
👍 2
f3 2
Avatar
+1 good feature 👍
👍 1
f3 1
20:45
I would say yes
👍 1
f3 1
Avatar
i personally dont find it useful
f3 3
f4 1
banhammer 2
21:38
Name change logic is quite involved in DDNet, especially with Unicode confusables. This would make extracting finishes out of teehistorians easier.
21:41
Add CEditorMap::PerformSanityChecks to perform additional sanity checks when loading a map in the editor. In particular, the following is added: Check if there are any images with a width or height that is not divisible by 16 which are used in tile layers. Reset the image for these layers, to prevent crashes with some drivers. Closes #6519. Error message popup when loading the map linked in the issue (loading goes through, but this popup message is shown): ![screenshot_2023-07-1...
Avatar
ea219d9 Perform sanity check and show errors when loading map in editor - Robyt3 68d7875 Merge #6829 - bors[bot]
Exported 377 message(s)