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-14 00:00:00Z and 2023-07-15 00:00:00Z
Avatar
it does?
Avatar
Avatar
louis
is that even proper statistical analysis
It's probably a flawed study, the group of projects with swear words must be much much smaller
Avatar
is wtf a swear word?
Avatar
As evidenced by the distribution not really being normal, central limit theorem guarantees that with enough of a sample size you'll always get a normal, as you do on the left one
Avatar
Avatar
Chairn
it does?
it just shows the distribution for each on their own no?
00:03
am i tripping
Avatar
in the same way you can compare numbers, you can compare distributions (edited)
Avatar
like having an average for each value would be a better comparison
00:03
and yeah looks like the sample size is too small for the one on the right anyways
Avatar
you can also see here the asymmetry of the second one
Avatar
theres nothing 9+
Avatar
but yeah, we lack also the std deviation, the kurtosis and asymmetry factor if we want to be pedantic
00:04
we also lack sample size for each one, methodology and roughly 95% of a real study
😃 1
00:07
It's just one graph
Avatar
🤓 this twitter post is confirmed not statistically sound
Avatar
Also depends very much on what code quality metric is used
😃 1
05:10
another day i get the urge to do some ddnet web dev
05:10
with rust
05:10
maybe ill do it finally
Avatar
Avoids quadpoints being moved when selected.

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
  • [x] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's me...
Avatar
ws-client BOT 2023-07-14 06:36:31Z
<Jupstar> @Ryozuki when if not today, on FFR
06:37
when im done with gym
Avatar
Avatar
Ryozuki
another day i get the urge to do some ddnet web dev
what even is rust web development? I can only imagine it writing your wasm code
07:16
backend
07:16
my go to stack nowadays is rust backend svelte ts frontend
07:17
im gonna do a master visualizer i think
Avatar
oh u mean as backend i see, sounds like a nice stack
Avatar
ws-client BOT 2023-07-14 07:18:43Z
<Jupstar> i mean even for wasm its cool
Avatar
please do it ddnet.org gives me chills
Avatar
ws-client BOT 2023-07-14 07:18:55Z
<Jupstar> blazingly fast startup times
07:19
<Jupstar> blazingly few javascript
Avatar
ill try
07:20
modern slick
07:20
blazing fast
07:20
fearless concurrnecy
Avatar
catgirl devs
07:21
with socks
07:21
put the rust socks
Avatar
chillerdragon BOT 2023-07-14 07:23:08Z
WTF is that a response to my !p from yesterday? (<@749222324980416602_chillerbot>)
Avatar
ws-client BOT 2023-07-14 07:24:14Z
<Jupstar> i think i have to write yet another serialization library for rust xdd
07:24
Benchmarks for rust serialization frameworks. Contribute to djkoloski/rust_serialization_benchmark development by creating an account on GitHub.
07:24
<Jupstar> they are simply too slow
07:24
they pretty fast
07:24
iirc
Avatar
ws-client BOT 2023-07-14 07:32:19Z
<Jupstar> i need the fastest
Avatar
alkahest looks nice
07:58
but its weird to put serde_json there
07:58
json is inherently slower than others like bincode
08:00
rkyv too
08:08
@Learath2
08:08
here its shown too
08:08
the let thing we discussed
Avatar
my rust pr was merged finally
08:18
present rust contributor
Avatar
974255b fix quadpoint moving on selection - Marmare314 6ee788e Merge #6846 - bors[bot]
Avatar
ws-client BOT 2023-07-14 09:03:57Z
<Jupstar> @Ryozuki u are smth better now than us
Avatar
chillerdragon: I've now a daily updating archive of the ddnet discord channels: https://archive.strct.cc/ddnet (and some more) Not an interactive Matrix bridge yet, but at least read-only access.
Avatar
ws-client BOT 2023-07-14 09:25:11Z
<Jupstar> omg that looks fancy af xd
Avatar
Zwelf: cool!
09:29
I love archives
Avatar
@Jupstar ✪ cool benchmark
Avatar
Avatar
Ryozuki
but its weird to put serde_json there
I think it's good to include, so you can see how much slower it is
Avatar
Run workflows for GitHub merge queue. Fixes #6558.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's m...
09:50
94f45d4 Enable GitHub merge queue - heinrich5991 ed3f0a6 Merge pull request #6847 from heinrich5991/pr_ddnet_merge_queue - heinrich5991
09:50
[ddnet/ddnet] New branch created: pr-6847-6ee788e6004c7454524936f85851d3dc18abad12
Avatar
hmmmmmm
Avatar
Lol
09:54
Did it do that automatically?
Avatar
yes. but before passing checks
09:54
I seem to have misconfigured something
Avatar
Rn it's only on the merge queue branch? Maybe it reopens the pr or smith xd
09:55
Smth
09:56
Ah no it merged into master
09:56
And additionally a branch lol
Avatar
When starting with dbg_stress 1 the invalid texture was never actually getting loaded, which was causing the client to crash when using the Vulkan backend and starting with dbg_stress 1. Additional...
09:58
can you try to merge it using hte merge queue?
Avatar
8e2411f Fix invalid texture being invalid and causing crash with Vulkan - Robyt3 19263ca Merge pull request #6836 from Robyt3/Graphics-Invalid-Texture-Invalid - Jupeyy
09:59
[ddnet/ddnet] New branch created: pr-6836-ed3f0a6cfbb74ef8faeb309cc2df5cc2c88b5b9e
Avatar
Why did it work now?
Avatar
I changed some settings on the repo itself
Avatar
I x
10:00
C
Avatar
chillerdragon BOT 2023-07-14 10:11:06Z
Cool stuff thanks. How is that done? Is it a officially supported export feature? Who is hosting that?
chillerdragon: I've now a daily updating archive of the ddnet discord channels: https://archive.strct.cc/ddnet (and some more) Not an interactive Matrix bridge yet, but at least read-only access.
Avatar
Exports Discord chat logs to a file. Contribute to Tyrrrz/DiscordChatExporter development by creating an account on GitHub.
10:17
not really official, but best option for me from available listed on https://wiki.archiveteam.org/index.php/Discord
Avatar
Farewell, you've served use well. CC #6558

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck]...
10:24
8e2411f Fix invalid texture being invalid and causing crash with Vulkan - Robyt3 19263ca Merge pull request #6836 from Robyt3/Graphics-Invalid-Texture-Invalid - Jupeyy
Avatar
did that pr merge itself without review?
10:30
ah heinrich did it
10:30
ill miss bors r+
Avatar
Farewell, you've served use well. CC #6558 Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configuration options...
10:31
you can try out the new thing 🙂
10:31
i will xD
10:31
@heinrich5991 merge when ready waits for ci right?
Avatar
correct
10:31
it's like bors r+
10:32
pog
Avatar
hmmmm
10:32
this looks different from merge queue
10:32
let's see if it'll work
Avatar
i think it auto merges into the queue
10:33
i guess the merge queue is a requirement
Avatar
Avatar
Ryozuki
ill miss bors r+
bors was a nice service 🙂 I'm thankful we had access to it
Avatar
ws-client BOT 2023-07-14 10:35:11Z
<Jupstar > lmao the greatest contributor to our project died xd
10:35
true
10:35
im still mad 100 commits of mine are not counted
10:36
cuz github doesnt resolve mailmap
Avatar
oh, it does not?
Avatar
no sadly
10:36
i would be top 9
10:36
or 8
Avatar
Avatar
Ryozuki
cuz github doesnt resolve mailmap
have you found a feature request?
Avatar
Git mailmap is used for patching / correcting emails of a particular contact in git. It replaces and corrects info in git log, etc. How to get github to record contributions to the right person’s p...
10:37
Avatar
I see
10:37
unfortunately, github is closed-source software
10:37
otherwise you could have fixed it yourself
Avatar
@Ryozuki did you press any more buttons?
10:43
or did it add itself to the merge queue?
Avatar
looks so weird xdd. i wonder if that influences the stats on gh profil
Avatar
no, merge commits aren't counted AFAIK
10:45
any preference for merge commits vs rebasing?
10:45
btw (edited)
Avatar
ws-client BOT 2023-07-14 10:45:57Z
<Jupstar > rebase i guess xd
Avatar
Builds upon #6848.

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/d...
Avatar
conflicts
Avatar
I'm not sure how there can be conflicts
11:00
but we'll see 🙂
Avatar
6de3184 Remove last traces of bors - heinrich5991 01ec7ad Merge pull request #6848 from heinrich5991/pr_ddnet_rm_bors - edg-l
Avatar
@heinrich5991 sometimes there arent, u just need to rebase
Avatar
@Ryozuki seems like github is buggy(?) there are no merge conflicts when merging the branch on the command line
Avatar
yeah idk
11:03
i seen this a lot
Avatar
rebased
Avatar
does it auto close issues just like bors though ?
Avatar
@deen on the sqlite dumps, can u make map.timestamp nullable and put the 0000-00-00 timestamps as null?
Avatar
Avatar
Chairn
does it auto close issues just like bors though ?
that's a github feature, not a bors feature
11:06
so yes
Avatar
with that fix pgloader would work and i would be able to import it to psql
11:06
which probs works faster
11:06
and maybe ddstats can be faster
11:07
2023-07-14T11:07:23.147996Z ERROR Database error 22008: date/time field value out of range: "0000-00-00 00:00:00" QUERY: CREATE TABLE maps ( map text, server text, points bigint default '0', stars bigint default '0', mapper text, timestamp timestamp default '0000-00-00 00:00:00' );
11:07
and sqlite doesnt support alter column xd
11:08
its such a chore
Avatar
@Ryozuki https://github.com/ddnet/ddnet/pull/6849 could you review this?
Builds upon #6848. Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configuration options Written a unit test (espec...
Avatar
nice. now it doesn't rnu all the checks twice
11:32
ah
11:32
maybe the merge conflict thing came because I changed the merge mode to rebase instead of merge
11:32
perhaps merge would be better?
Avatar
its easier certainly
Avatar
ws-client BOT 2023-07-14 11:33:46Z
<Jupstar> but why should rebase not work in such a case
Avatar
because it likely tried to rebase both commits
11:34
even the one already included in master
Avatar
ws-client BOT 2023-07-14 11:34:41Z
<Jupstar> mh weird behavior xd
Avatar
well, I'll leave it as rebase for now
11:38
let's see how it works out or if someone complains
Avatar
ws-client BOT 2023-07-14 11:39:30Z
<Jupstar> bors used merged right?
11:39
<Jupstar> the commits were always all over the place
Avatar
yes
11:40
bors used merge, it couldn't do rebase unless you self-hosted it
11:40
we didn't ahve a choice there
Avatar
4838c10 Don't run status checks on GitHub merge queue state twice - heinrich5991
Avatar
the hashes for the nightly version somehow doesnt align, can someone check too? https://ddnet.org/downloads/DDNet-nightly-win64.zip https://ddnet.org/downloads/md5sums.txt (edited)
Avatar
I can confirm that it doesn't match
11:53
wasnt it sha
Avatar
we also have sha256
Avatar
both don't match
11:53
(you should ignore md5, probably, and only use sha256)
Avatar
it probably just didn't got updated: $ curl -I https://ddnet.org/downloads/sha256sums.txt HTTP/2 200 last-modified: Sun, 09 Jul 2023 00:19:13 GMT $ curl -I https://ddnet.org/downloads/DDNet-nightly-win64.zip HTTP/2 200 last-modified: Thu, 13 Jul 2023 22:15:51 GMT
Avatar
ah
11:56
we had full disk problems on ddnet.org yesterday
11:57
probably due to that
Avatar
ws-client BOT 2023-07-14 11:57:09Z
<Jupstar> on 9th july was last release
11:57
<Jupstar> maybe they were never updated in first place
Avatar
ah
11:57
maybe
Avatar
ws-client BOT 2023-07-14 11:58:47Z
<Jupstar> we dont offer any download besides https do we? so they are not that useful anyway
11:58
<Jupstar> if your https isnt secure, then these keys probs wont help xd
Avatar
pub fn chunkcount_any(input: &str) -> i32 { let chunks = input .as_bytes() .chunks_exact(112); let rem = chunks.remainder(); let mut res = chunks.map(|chunk| { chunk .iter() .map(|&b| match b { b's' => 1, b'p' => -1, => 0, }) .sum::<i8>() }) .map(|acc| acc as i32) .sum::<i32>(); ...
12:04
look at this
12:04
auto simd
12:04
epic
Avatar
Avatar
ws-client
<Jupstar> we dont offer any download besides https do we? so they are not that useful anyway
It would be useful if one of us would sign the checksums file actually
Avatar
@Ryozuki why 112?
12:16
idk
12:16
i found it here
12:16
in comments
Avatar
apparently unity can glitch when you delete something and decided it want to delete a parent folder instead
12:30
my day is ruined
Avatar
my dog ate my unity project
Avatar
literally
12:31
or i have schizophrenia and just thought i worked the entire day
Avatar
Avatar
Ryozuki
idk
also seems to work with 256
Avatar
no git?
12:40
git solves that
12:40
small commits
12:40
rebase when done
12:42
hello its friday
12:42
and
12:42
Core was generated by `./DDRace64-Server_sql -f servers/block2.cfg'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill_implementation (threadid=<optimized out>, signo=sig...
12:42
rust would have prevented this
12:42
have a good day
Avatar
was about to say
Avatar
Avatar
Jupstar ✪
was about to say
rly? xd
Avatar
not this issue, but i wanted to remind its friday
Avatar
it's also 14th of july
12:43
french national day
12:43
d7e70e3 Remove mention of MD5 - heinrich5991 c05e86d Merge pull request #262 from heinrich5991/pr_rm_md5 - edg-l
Avatar
Avatar
Chairn
french national day
congratz
12:43
on whathever this means for u a french
12:44
maybe ill do french fries today
12:44
trollet
Avatar
officially, it's french federation day, but lots of people thinks more about Bastille take over
Avatar
Bastille Day is the common name given in English-speaking countries to the national day of France, which is celebrated on 14 July each year.
Avatar
which is officially wrong
Avatar
I don't think anything in that sentence is wrong 😄
Avatar
#[no_mangle] pub unsafe extern "C" fn dict_get( map: *mut std::ffi::c_void, key: &[u8; 32], ) -> *mut std::ffi::c_void { let ptr = map.cast::<HashMap<[u8; 32], NonNull<std::ffi::c_void>>>(); if let Some(v) = (*ptr).get(key) { v.as_ptr() } else { std::ptr::null_mut() } } its safe if i save a ptr to a hashmap outside rust and pass it to extern c rust functions to use its functionality? (edited)
12:47
justatest
Avatar
yes
12:47
what are you doing?
Avatar
@murpi maybe there should be a "bug" button that redirects to the bug channel, if such thing is possible
12:47
better than handle those stuff private 😄
Avatar
bad stuff
Avatar
Well, #welcome specifically says: Other (for miscellaneous issues) Note: No technical support.
Avatar
add a bug report button xd
Avatar
and I had nothing else to do, so yeah
Avatar
and the bot sends a #bugs msg
Avatar
Avatar
murpi
and I had nothing else to do, so yeah
wdym by this
12:49
btw its mildly triggering
12:49
but the icon on linux looks shiet
Avatar
means im currently im bed, doing literally nothing so I might as well answer the guys question
12:50
^^
Avatar
Avatar
Ryozuki
btw its mildly triggering
can probably™ be fixed by installing the right font
Avatar
u know which?
12:51
i have windows fonts installed iirc
Avatar
he kinda cheats though, input string is not supposed to be only s and p
Avatar
Avatar
heinrich5991
what are you doing?
i dont want to code a hashmap in mlir again so we have like part of a rust runtime in it
Avatar
looks nice
12:53
send font
Avatar
Avatar
Ryozuki
i dont want to code a hashmap in mlir again so we have like part of a rust runtime in it
ah nice
Avatar
win7 discord app
Avatar
Avatar
Ryozuki
i have windows fonts installed iirc
no. some emoji font
Avatar
Avatar
Chairn
win7 discord app
didnt u say when u finished paper u would come to linux
12:54
i gotta upgrade my ubuntu 18 though
Avatar
hello, past is calling, they want their chairn back
Avatar
im probably gonna get linux mint if anything when i DO get a linux
Avatar
try it in a vm
12:57
can u use qemu in windows?
🇫🇷 1
Avatar
qemu is so good
Avatar
im mobile i cant check
Avatar
WSL
Avatar
I usually use virtualbox
12:58
exists for windows
Avatar
i always want to try some embedded chips and stuff with rust
12:58
but im unoriginal
12:58
idk what to do
12:58
i have a stm32 iirc
Avatar
do vms already support OpenglOnDirect12
Avatar
Avatar
Ryozuki
i have a stm32 iirc
how do you program it?
12:59
ST IDE is garbage built on garbage eclipse....
Avatar
i have a stm32f3 and a stm32g491
12:59
no ides
Avatar
@Voxel try native, else u dont feel the linux perf boost vms are slow af and gpu drivers are always bad xd
Avatar
Rust is a great language but is it a good fit for embedded development? This post will guide you through the set-up of the embedded…
Avatar
u'll get a wrnog image burnt into your head
Avatar
back in my days, virtualbox had not gpu driver available
Avatar
now it has
13:00
if u have a second gpu
13:00
u can also do passthrough
13:00
native perf right
Avatar
what about this
Avatar
Avatar
Ryozuki
u can also do passthrough
passthrough is such a godsent
Avatar
wasm with 64 -bit memory model
Avatar
Freestanding/bare-metal x86-64 binaries in ELF format: firmware, kernels, etc.
Avatar
Avatar
Jupstar ✪
wasm with 64 -bit memory model
is it 32 rn?
Avatar
Avatar
Ryozuki
is it 32 rn?
yes
Avatar
why do we need more than 4gb of ram? :p
13:01
for wasm
Avatar
to run wasm games for example
Avatar
thats not the point
13:01
usize is 32bit too
Avatar
why is that a problem?
Avatar
easier to read linear memory if memory has the same sizes xd
Avatar
@Chairn do u know a microprocessor with lot of docs?
13:02
i know espresso does a lot of software
13:02
was it the name
13:03
Libraries, crates and examples for using Rust on Espressif SoC's - esp-rs
13:03
espressif
Avatar
Avatar
Ryozuki
@Chairn do u know a microprocessor with lot of docs?
risc-v is quite well documented, but real chips unfortunately are not...
13:04
Alpha architecture used to be a standard in experiments during 2000's
13:04
you can try Atmel chips that are used by arduino
Avatar
how can i summon a tee with purpose in my server
Avatar
there are also softcore such as picoblaze for FPGA only
Avatar
Avatar
Villager
how can i summon a tee with purpose in my server
"Connect dummy"
13:06
in esc menu
Avatar
i mean i want to write a npc
Avatar
maybe u should first play around with server code
13:07
this is a very specific question
Avatar
Micromouse is an event where small robotic mice compete to solve a 16×16 maze. It began in the late 1970s. Events are held worldwide, and are most popular in the UK, U.S., Japan, Singapore, India, South Korea and becoming popular in subcontinent countries such as Sri Lanka. The maze is made up of a 16×16 grid of cells, each 180 mm square with wa...
Avatar
Avatar
Chairn
there are also softcore such as picoblaze for FPGA only
if i lived in my own house i would def make it smart
13:09
with rust
13:09
i live with parents still so its a bother
Avatar
make it smart anyway :p
13:10
I actually don't like the word 'smart' 😄
13:10
ye but idk how to convey the meaning
13:10
actually i have a aquarium
13:11
i made it "smart" with a simple timed switch
13:11
it just turns on and off lights
Avatar
wdym "make it smart" ?
Avatar
thats already not smart xd
Avatar
@Chairn automate shit
13:11
for example
Avatar
i don't get the relation with the post you replied to
Avatar
i think here u pay electricity prices depending on hour
13:11
when usage is low u pay less
13:11
so making laundry at late night is cheaper
13:11
iirc
Avatar
Avatar
Chairn
i don't get the relation with the post you replied to
no relation sry
13:12
im just dum
Avatar
don't you have a room ?
Avatar
its quite small
Avatar
and don't you earn 3k€ ?
Avatar
ryo already leaked his room
Avatar
really?
Avatar
but ye
13:12
im saving
13:12
to go
Avatar
i ahven't seen it
Avatar
i'm still waiting for fokkonauts reveal 😬
Avatar
@Chairn
13:13
this was some time ago
13:13
most of my hardware kek
Avatar
that's no room 😄 , that's just desktop (edited)
13:13
well the bed is behind
Avatar
but u see its very small
Avatar
and a small aquarium
Avatar
actually, desktops
Avatar
thats it
Avatar
uh no? there's no wall on right apparently, so could be huge
Avatar
there is wall bru
Avatar
i mean, wall on left is going backward while wall on right is going right, so we can't estimate the room area
Avatar
its more or less same
13:15
the room is just weird
Avatar
@Chairn when do u leak
Avatar
never i guess
13:15
i just have one laptop, not really interesting
Avatar
inb4 30 monsters
13:15
in desk
13:15
pee bottle
Avatar
i want to see your toilet paper reserves
Avatar
sorry, the bear is out, he took all the toilet paper with him
Avatar
poor bear
13:17
@Jupstar ✪ r u working rn
13:17
@Chairn since ur a teacher, do u have holidays rn?
13:17
well in spain there is no school rn
Avatar
Avatar
Ryozuki
@Jupstar ✪ r u working rn
no, you?
Avatar
im working
13:17
from home
Avatar
i see that
Avatar
Avatar
Ryozuki
@Chairn since ur a teacher, do u have holidays rn?
not yet, im also a researcher you know
Avatar
but today is public holliday
13:18
due to national day
Avatar
Avatar
Chairn
not yet, im also a researcher you know
how is research going
Avatar
i cant reproduce fault injection from ARM to RISC-V
Avatar
whats fault injection
Avatar
like a x86 double fault?
Avatar
Avatar
Ryozuki
whats fault injection
physically faulting the hardware to disturb program execution and potentially retrieve secret data or gain execution with a combination of software attack
Avatar
in my case, i use clock glitch injection
13:20
i.e. i can create 2 clock cycles within the duration of a normal clock cycle leading to some data path being in "undetermined" state
Avatar
interesting
Avatar
Avatar
Chairn
2027 is very very lax on the regulators side, but thank god finally
Avatar
Avatar
Chairn
physically faulting the hardware to disturb program execution and potentially retrieve secret data or gain execution with a combination of software attack
This sort of hardware glitching has always fascinated me, you can get such bizarre behaviour
Avatar
Avatar
Learath2
2027 is very very lax on the regulators side, but thank god finally
is the eu the only thing doing consumer-friendly laws recently?
Avatar
At least I haven't heard anyone else trying to regulate these tech behemoths at all
Avatar
um, writing to a mut global is unsafe?
Avatar
Globals are evil
14:20
xDD
Avatar
And passing some obviously global context variable around and pretending it's not global isn't evil
Avatar
unsafe_and_evil { int g_evil = 0; } void IncrementGlobal(int v) { unsafe_and_evil { g_evil += v; } }
Avatar
I swear computer science people have some sort of brainrot
Avatar
Avatar
Learath2
And passing some obviously global context variable around and pretending it's not global isn't evil
there is no global context 😉
Avatar
True king
Avatar
Avatar
Learath2
um, writing to a mut global is unsafe?
global muts are unsafe because you can obtain multiple mut references
14:21
you can still have mutable (non-mut) global state
14:21
what are you trying to do? @Learath2
Avatar
Avatar
heinrich5991
what are you trying to do? @Learath2
I want a context variable, that'll get initialized late and can change
14:23
A singleton
Avatar
not a lot of context. Mutex<Option<State>> would probably work?
Avatar
Avatar
heinrich5991
not a lot of context. Mutex<Option<State>> would probably work?
If I pass it around to every function that needs the state
Avatar
no, in a static
14:24
(not static mut)
Avatar
i guess he meant holding the lock everywhere?
14:25
dunno what u doing learath, but if its not some random project go the hard way and use no globals
Avatar
rust's stdlib also uses globals 😉
14:25
sometimes they're useful
Avatar
Avatar
heinrich5991
no, in a static
Can you even mutate the inside of a Mutex? atleast it won't allow me
Avatar
lock
Avatar
Avatar
Learath2
Can you even mutate the inside of a Mutex? atleast it won't allow me
yes
14:26
.lock().unwrap()
Avatar
Avatar
Jupstar ✪
dunno what u doing learath, but if its not some random project go the hard way and use no globals
But why? This is why I hate "rules" like this. Some weirdo doesn't like them and writes some article that everyone swoons over for 3 decades. What actually is wrong with a singleton actually being global?
14:27
Yes, they are usually not good, but a singleton is the perfect place for them
Avatar
Avatar
heinrich5991
rust's stdlib also uses globals 😉
bad design, i blame the OS tho, they are not designed for this yet xd the only globals that must exists is a minimal set of core functionality the OS must implement xd
Avatar
Avatar
Learath2
But why? This is why I hate "rules" like this. Some weirdo doesn't like them and writes some article that everyone swoons over for 3 decades. What actually is wrong with a singleton actually being global?
i mean heinrich already said it
14:28
multiple mutable references
14:28
and locks can have deadlocks
Avatar
Avatar
Jupstar ✪
multiple mutable references
That's a rust thing, definitely not the reason people hate globals
Avatar
Avatar
Jupstar ✪
and locks can have deadlocks
Locks can always have deadlocks, you don't hate globals you hate locks then
Avatar
Avatar
Learath2
Locks can always have deadlocks, you don't hate globals you hate locks then
then use unsafe?
Avatar
in languages other than rust, globals can easily cause dataraces
14:29
you can use globals in rust without using unsafe
Avatar
it sounds like he wants to use globals in unsafe matters
Avatar
@Learath2 does the static DATA: Mutex<Option<Data>> = Mutex::new(None); work for your use-case?
Avatar
Avatar
Jupstar ✪
it sounds like he wants to use globals in unsafe matters
No, you just gathered that from the fact that you don't like globals and anyone that uses them must be doing something wrong in your mind
Avatar
Avatar
Learath2
That's a rust thing, definitely not the reason people hate globals
the problem is, sure u can say if u only use a global and thought about it 1 week, then they might be nice to share some stuff but the truth is they will be used like in ddnet source code
14:30
completely random
Avatar
I think there are valid use-cases for globals
Avatar
if u dont do std::exit in a cpp shared library they stay active
14:31
u have random broken states everywhere
Avatar
Avatar
heinrich5991
@Learath2 does the static DATA: Mutex<Option<Data>> = Mutex::new(None); work for your use-case?
Let me think about it for a second. I can't argue against deep rooted ideology and code at the same time
Avatar
Avatar
Jupstar ✪
if u dont do std::exit in a cpp shared library they stay active
I don't understand this
14:31
when c++ exits main, it calls all the destructors, no?
Avatar
what main?
Avatar
int main() {}
14:32
whne the program exits
14:32
the whole program
Avatar
well with shared libraries i meant dynamic libraries
Avatar
I don't understand it yet. even destructors in shared librariese hsould be calld when the main process exits
Avatar
u can unload a shared library without destroying its state, as android does it
Avatar
I mean that's kinda on android though
14:33
it doesn't support C++ apparently
14:34
then you could say "globals are evil because android doesn't support c++ properly"
Avatar
thats not an android bug
Avatar
why is it not?
14:34
I think shared libraries call destructors on linux
14:34
when you unload them
14:35
there's a special link section for this, I think
Avatar
@Learath2 pls give me cpp spec that guarantees the above
Avatar
can confirm that the esp32 rust support is really damn good. call it bloated microcontroller programming but I enjoyed having most of the rust std library available ^^. I coded some infrastructure in rust on the microcontroller and didn't really face many problems. https://esp-rs.github.io/book/
Avatar
Avatar
Jupstar ✪
@Learath2 pls give me cpp spec that guarantees the above
shared libraries don't exist in the cocntext of the C++ standard
Avatar
Avatar
Learath2
um, writing to a mut global is unsafe?
it is in rust cuz its not thread safe
Avatar
Avatar
heinrich5991
shared libraries don't exist in the cocntext of the C++ standard
so you agree that this is not an android bug
Avatar
no, I do not
14:36
a compiler failing to compile something also adheres to the C++ standard
Avatar
Avatar
Patiga
can confirm that the esp32 rust support is really damn good. call it bloated microcontroller programming but I enjoyed having most of the rust std library available ^^. I coded some infrastructure in rust on the microcontroller and didn't really face many problems. https://esp-rs.github.io/book/
nice!
Avatar
I'd still call it a bug in the C++ compler
14:36
failing to compile any source file at all
Avatar
Avatar
Learath2
Let me think about it for a second. I can't argue against deep rooted ideology and code at the same time
check out once_cell and its lazycell variant
Avatar
what I want to say: having a functioning c++ compiler goes beyond adhering to the standard (edited)
Avatar
Avatar
Ryozuki
check out once_cell and its lazycell variant
I was thinking OnceCell but I need to mutate it more than once
Avatar
well then mutex
14:38
does thread local work here if ur not doing mt?
14:38
use std::cell::Cell; thread_local! { pub static FOO: Cell<u32> = const { Cell::new(1) }; }
Avatar
I'm doing mt
Avatar
they just added const support for it
14:38
ah then mutex ye
14:39
@Learath2 well check RwLock if u read more than write
Avatar
good idea
Avatar
Rust Memory Container Cheat-sheet. Contribute to usagi/rust-memory-container-cs development by creating an account on GitHub.
14:39
14:39
this is a rly good pic imho
14:39
i usually follow this
14:41
i like how deen checks this channeel from time to time
14:41
and possible the only thing he sees
14:41
is rust
14:42
as intended (edited)
14:42
cant write
14:44
@Jupstar ✪ when bible?
Avatar
Avatar
heinrich5991
@Learath2 does the static DATA: Mutex<Option<Data>> = Mutex::new(None); work for your use-case?
This works with std::sync::Mutex but not with tokio::sync::Mutex, I'm perhaps just misunderstanding something, but it seems tokios mutexguard doesn't implement DerefMut for some reason
14:45
I think I'll just pass around an Arc<Context> like I did last time, I can't believe you actually made me feel bad about using a global
Avatar
Avatar
Learath2
This works with std::sync::Mutex but not with tokio::sync::Mutex, I'm perhaps just misunderstanding something, but it seems tokios mutexguard doesn't implement DerefMut for some reason
u can use sync mutex in tokio
Avatar
Well Arc<Mutex<Context>> that is
Avatar
Avatar
Learath2
This works with std::sync::Mutex but not with tokio::sync::Mutex, I'm perhaps just misunderstanding something, but it seems tokios mutexguard doesn't implement DerefMut for some reason
tokio's MutexGuard seems to impl DerefMut
Avatar
btw i think in tokio u should spawn blocking calls in a special way
14:47
Runs the provided closure on a thread where blocking is acceptable.
Avatar
Avatar
Learath2
This works with std::sync::Mutex but not with tokio::sync::Mutex, I'm perhaps just misunderstanding something, but it seems tokios mutexguard doesn't implement DerefMut for some reason
An asynchronous reader-writer lock.
Avatar
Avatar
heinrich5991
tokio's MutexGuard seems to impl DerefMut
Ah, they weren't returning a Result like the std one, yeah I figured it out
Avatar
wdym it doesnt impl derefmut
14:48
u have to do .lock().await iirc
Avatar
or blocking_lock()
Avatar
and omit the unwrap
Avatar
yeah they dont handle poisoning i think
14:49
its a debate in rust itself
Avatar
Or maybe I should think of making the context actually immutable, I didn't end up needing it last time and removed it, that's even safer
14:50
Anyway, thanks, I hadn't thought of a Mutex
Avatar
Mutex poisons not for true safety in the sense that Rust normally cares about. It poisons as a safety-guard against blindly using the data that comes out of a Mutex that has witnessed a panic while locked. The data in such a Mutex was likely in the middle of being modified, and as such may be in an inconsistent or incomplete state. It is important to note that one cannot violate memory safety with such a type if it is correctly written. After all, it must be minimally exception-safe!
>
However if the Mutex contained, say, a BinaryHeap that does not actually have the heap property, it's unlikely that any code that uses it will do what the author intended. As such, the program should not proceed normally. Still, if you're double-plus-sure that you can do something with the value, the Mutex exposes a method to get the lock anyway. It is safe, after all. Just maybe nonsense.
14:50
The Dark Arts of Advanced and Unsafe Rust Programming
Avatar
Why is there a debate? I think it's a good idea, no? Such data is rarely ever useful
Avatar
cuz its not unsafe
14:51
idk
14:51
i just said it there is debate
14:51
it adds lot of unwraps xd
14:51
@Learath2 u sure u dont want rwlock?
Avatar
I guess if you know for sure what panic'd and what it touches is limited to something that can just be reinitialized, maybe it's sane to keep using
Avatar
multiple readers
Avatar
Avatar
Ryozuki
@Learath2 u sure u dont want rwlock?
I think I'll just get rid of the mutability by getting more out of the context, so I can just have a OnceCell
Avatar
you probably want to have OnceLock instead: https://doc.rust-lang.org/std/sync/struct.OnceLock.html
A synchronization primitive which can be written to only once.
14:53
OnceCell (stdlib) doesn't work with threads
Avatar
Ah, yes that one
Avatar
Avatar
heinrich5991
sometimes they're useful
btw i don't directly agree with this. It depends on the OS design rn you have an OS that does everything for you. it deallocates the processes you allocated etc. I bet in future there are operating systems that are so minimal that u rather link against an OS sdk than having a kernel space and user space with a minimal set of data that can be considered a global state a global variable would mean there is a "known" location(be it a memory address or a global function) that initializes it or accesses it in some kind. So you increase amount of "OS SDK" again. All code would be truely position independent with such a concept Current global variables are scoped bcs they are within a program that works with virtual memory addresses So yeah not future proof. Thanks for agreeing with me humans in 2000 years (edited)
Avatar
Avatar
Jupstar ✪
@Learath2 pls give me cpp spec that guarantees the above
Shared lib destructors get called? As far as C++ standard is concerned shared libraries aren't even a thing
Avatar
yeah yeah was more a trick question
14:58
even dlopen allows "saving" global variables
14:58
e.g. not deallocating them
14:59
"RTLD_NODELETE (since glibc 2.2) Do not unload the library during dlclose(). Consequently, the library's static variables are not reinitialized if the library is reloaded with dlopen() at a later time. This flag is not specified in POSIX.1-2001."
14:59
xd
Avatar
Avatar
Jupstar ✪
btw i don't directly agree with this. It depends on the OS design rn you have an OS that does everything for you. it deallocates the processes you allocated etc. I bet in future there are operating systems that are so minimal that u rather link against an OS sdk than having a kernel space and user space with a minimal set of data that can be considered a global state a global variable would mean there is a "known" location(be it a memory address or a global function) that initializes it or accesses it in some kind. So you increase amount of "OS SDK" again. All code would be truely position independent with such a concept Current global variables are scoped bcs they are within a program that works with virtual memory addresses So yeah not future proof. Thanks for agreeing with me humans in 2000 years (edited)
How is my bots context not part of it's minimal set of global state?
Avatar
Avatar
Learath2
How is my bots context not part of it's minimal set of global state?
u bloat the global space with a global state
Avatar
How is passing every function the exact same address any different from a global?
Avatar
why should it have the same address?
Avatar
Barring memory mapping shenanigans, I allocate it once, it'll be passed to every function, it'll have the same address
15:02
It has to be Pin with multiple things reading it aswell so no rust moving shenanigans either
15:02
In C++ even less, the compiler won't move things around
Avatar
well depends on if u want this
Avatar
If the argument was that any such piece of data is bad I'd have an easier time following it, but passing the same address to everything vs the compiler placing it compile time and providing the address really doesn't seem any different to me
Avatar
anyway
15:05
what i want to ultimately say is it destroys modularity
Avatar
(You know why globals are actually hated? They don't exist in math)
Avatar
xDDDDDDDDDDD
15:06
ok touche
15:06
but yeah u also pass the address of all functions in your whole programm 😬
Avatar
Avatar
Jupstar ✪
what i want to ultimately say is it destroys modularity
But why aren't modules allowed to have local globals?
Avatar
save me immortal humans 2000 years from now
15:06
i want to see such an OS design in action
Avatar
Things have to have some state, even Haskell people have to pass around some state everywhere
Avatar
Avatar
Learath2
But why aren't modules allowed to have local globals?
mhh local globals xdd i mean i know what u mean, but isnt the module itself then a state
15:07
it's kind of your state object xd
Avatar
Avatar
Jupstar ✪
mhh local globals xdd i mean i know what u mean, but isnt the module itself then a state
Local global does sound like a bit like an oxymoron, but what you are saying makes it feel like my global state is leaking all the way to the kernel
15:08
It's not it's just "global" within my program
15:09
The only truly global state is the kernel
Avatar
yeah but that also means the kernel can be extremly small bcs the program does not need to know about any "kernel functions" except very very few
Avatar
registers :p
Avatar
anyway @Learath2 isnt rust already cool bcs if u dont use refcell and Rc and Arc and Mutex u basically never face hard to debug memory/data race behavior xd at least for a single threaded program i find this pretty cool tbh it wont scale to real world ofc, but who knows what programming languages there will be some day 😄
Avatar
Avatar
Jupstar ✪
anyway @Learath2 isnt rust already cool bcs if u dont use refcell and Rc and Arc and Mutex u basically never face hard to debug memory/data race behavior xd at least for a single threaded program i find this pretty cool tbh it wont scale to real world ofc, but who knows what programming languages there will be some day 😄
Even with Arc and Mutex there won't be any memory/data race issue
15:16
Even with multiple threads you are pretty safe in rust
Avatar
race conditions then*
Avatar
It indeed is pretty impressive, I just find it's compiler way too "endearing" at times
15:17
its* (?) I keep having trouble with this recently, when you have possession, do you use 's?
Avatar
and arc and rc can leak memory
Avatar
Avatar
Learath2
its* (?) I keep having trouble with this recently, when you have possession, do you use 's?
not for its
15:18
it is
15:18
it's
Avatar
it's = it is
15:18
its = belonging to it
Avatar
but it's heinrich's car
15:19
xd
15:19
heinrich's a car
15:19
xd
Avatar
Avatar
Jupstar ✪
but it's heinrich's car
Yeah, this is the one that confuses me
15:20
I guess it's just used to separate the s from the noun there and not as a contraction
Avatar
' are bloat 😬
15:21
we just lazy
Avatar
Avatar
Learath2
Even with multiple threads you are pretty safe in rust
u are safe with multiple threads, in the sense rust defines safe
15:32
u can leak, deadlocks, and race conditions (but not data races (if i didnt get this the other way i always forget))
Avatar
Avatar
Learath2
It indeed is pretty impressive, I just find it's compiler way too "endearing" at times
and its math
15:33
justatest
Avatar
Avatar
Learath2
its* (?) I keep having trouble with this recently, when you have possession, do you use 's?
it's = it is
Avatar
@Ryozuki does the heinrich move xDDD
Avatar
Avatar
Jupstar ✪
' are bloat 😬
no, ' are for lifetimes
15:34
gigachad
Avatar
#define 😬 '
Avatar
would be pog
15:34
😬a
Avatar
fn <😬 a>
15:34
xD
Avatar
fn<😬a>(hello: 😬a str) -> &😬a str;
Avatar
thats why rust needed proc macros
15:35
😬
Avatar
Avatar
Ryozuki
fn<😬a>(hello: 😬a str) -> &😬a str;
why the a
Avatar
u can also name it b
Avatar
ok so 😬a is just a name
Avatar
error: identifiers cannot contain emoji:
Avatar
grimaceA
15:38
dude im so funny quirky! grimace? like the Grimace Sh-
Avatar
if u use doc syntax, e.g. /**
  • you can do any syntax you want with rust, because the string here is preserved
*/
15:40
u can then parse the inner string
Avatar
Avatar
Voxel
ok so 😬a is just a name
&'a
Avatar
chillerdragon: when bash to rust proc macro?
15:43
then i can use bash inside rust code
15:49
@murpi #join-leave bot still needs the new channel id xdd
15:52
a bit silly to keep creating pull requests to a repository that no one manages
Avatar
who owns it?
Avatar
Avatar
murpi
a bit silly to keep creating pull requests to a repository that no one manages
what repo
15:56
what did i miss
Avatar
Avatar
Ryozuki
what repo
ddnet-discordbot
Avatar
lmao so many open prs
16:00
why dont u just merge @murpi
16:00
i also went full ego on my bot xdd
16:00
easier for small repos
16:01
if nobody cares to review just merge
Avatar
Avatar
Jupstar ✪
lmao so many open prs
tbh I'd just put all my changes into one PR
16:10
i dont have write access to it
Avatar
ChillerDragon BOT 2023-07-14 16:25:00Z
@jopsti use this crate https://github.com/matklad/xshell
Contribute to matklad/xshell development by creating an account on GitHub.
Avatar
but i need to distract you xd
Avatar
ChillerDragon BOT 2023-07-14 16:31:30Z
hrhrhr
16:31
nice try
16:33
https://zillyhuhn.com/tmp/12len.pcap @heinrich5991 @Davide here u go 238.0.0.2 is fokkos server 238.0.0.1 is me. My client was connecting to the server being filtered by the fw. And the server was still sending snaps from a prior connection of mine.
Avatar
By calculating the correct length of the string matched in the haystack using the added end parameter of str_utf8_find_nocase. Closes #6850. Add optional end output parameter to str_utf8_find_nocase which is set to a pointer into the haystack after the matched string. This is necessary because there are pairs of matching upper case and lower case Unicode characters with different byte length (e.g. both I and İ map to i), so the byte length of the string matched in the h...
16:59
Avatar
ChillerDragon BOT 2023-07-14 17:17:31Z
can i stop srv running in da client while in game?
17:17
pkill ddnetserver i geuss
Avatar
There is a stop server vote by default but ig you don't use a default server
17:28
And rcon shutdown also exists (edited)
Avatar
ChillerDragon BOT 2023-07-14 17:32:01Z
im ingame on other srv xd
Avatar
Ahh I get it now
Avatar
ChillerDragon: did you use an old version of the dissector at the time?
17:34
it's not showing me problems from the screenshot yesterday
Avatar
d382e09 Add end output parameter to str_utf8_find_nocase, add tests - Robyt3 65a64b6 Fix server browser filter highlighting of non-ASCII text - Robyt3
Avatar
Avatar
ChillerDragon
https://zillyhuhn.com/tmp/12len.pcap @heinrich5991 @Davide here u go 238.0.0.2 is fokkos server 238.0.0.1 is me. My client was connecting to the server being filtered by the fw. And the server was still sending snaps from a prior connection of mine.
Thx
Avatar
Avatar
ChillerDragon
https://zillyhuhn.com/tmp/12len.pcap @heinrich5991 @Davide here u go 238.0.0.2 is fokkos server 238.0.0.1 is me. My client was connecting to the server being filtered by the fw. And the server was still sending snaps from a prior connection of mine.
Seems not a really useful pcap. Start recording before joining the server, and wait 30-40 before stopping please
Avatar
ChillerDragon BOT 2023-07-14 18:34:42Z
@heinrich5991 not latest for sure
18:35
@Davide im not bugged anymore
Avatar
Delay showing the warning for ingame movement until the player has stopped moving while the editor is open, so the warning doesn't show immediately when the player performs an action (like jumping) and opens the editor shortly after. Closes #6852.

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 int...
Avatar
da81d03 Add 30 € donation by ReD - def-
🔥 1
Avatar
cfdc696 Delay "Ingame moved" warning in editor - Robyt3
Avatar

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Exported 676 message(s)