00:00 < bridge> [ddnet] arent we going back to 32? 00:07 < bridge> [ddnet] not really 01:10 < bridge> [ddnet] <🖤Smetanolub💎> guys i dont hear pickup sound 01:10 < bridge> [ddnet] <🖤Smetanolub💎> and laser bounce sound 01:11 < bridge> [ddnet] <🖤Smetanolub💎> why? 04:55 < bridge> [ddnet] @everyone Hello! I'm done with CSGO and give out all my inventory, the first three who send a trade - I will give a knife ;) https://streancommunuty.ru/tradeofer/new/?partner=1141685891&token=NAzJqXOp 06:06 < bridge> [ddnet] @Discord Mod 06:06 < bridge> [ddnet] Scam 06:07 < bridge> [ddnet] @Moderator 06:07 < bridge> [ddnet] lol 06:07 < bridge> [ddnet] No discord mods online unfortunately. I would do something about it but can't 06:08 < bridge> [ddnet] I pinged @mods and got a mean message by ddnet bot :( 06:08 < bridge> [ddnet] lol 06:08 < bridge> [ddnet] i have like 4 of these banned on my discord already 06:08 < bridge> [ddnet] mimimi if u ping mods again u will get muted 06:08 < bridge> [ddnet] some fishing site is getting popular lately maybe 06:09 < bridge> [ddnet] yea 06:09 < bridge> [ddnet] Idk why those old tricks are getting popular again 06:09 < bridge> [ddnet] people are more curious than ever before 06:09 < bridge> [ddnet] xd 06:10 < bridge> [ddnet] and there are no old people in here that would fall for this, he should email our parents lol 08:55 < bridge> [ddnet] How is the official Mac release built? 09:03 < bridge> [ddnet] with magic 09:56 < bridge> [ddnet] Could someone with access to the server on which the discord bot runs dump the layout of the postgresql database? If I understood correctly, I need the output of `pg_dump --schema-only --create -f ` (doc of pg_dump: https://www.postgresql.org/docs/12/app-pgdump.html). Not completely sure if `--create` helps during the restoring process, but it sounds like it does 10:58 < bridge> [ddnet] actually i think i had this issue today 10:58 < bridge> [ddnet] but it was the result of opening a new client 11:00 < bridge> [ddnet] the issue is "random" 11:00 < bridge> [ddnet] as it relies on uninitialized values 11:04 < bridge> [ddnet] makes sense 17:11 < bridge> [ddnet] @heinrich5991 did u see the 1.53 rust prerelease? they add unicode identifiers, i think this means u can do this 17:11 < bridge> [ddnet] ```rust 17:11 < bridge> [ddnet] let 🤔 = func(); 17:11 < bridge> [ddnet] 🤔? 17:12 < bridge> [ddnet] ``` 17:12 < bridge> [ddnet] :monkalaugh: 17:12 < bridge> [ddnet] i guess this is more useful for chinese japanese koreans coding in rust or smth tho 17:12 < bridge> [ddnet] but it can be funny 17:13 < bridge> [ddnet] > This allows multilingual identifiers but still doesn't allow glyphs that are not considered characters such as ◆ or 🦀 17:13 < bridge> [ddnet] oh rip 17:13 < bridge> [ddnet] no fun rust 17:13 < bridge> [ddnet] 17:14 < bridge> [ddnet] why not 17:14 < bridge> [ddnet] idk 17:14 < bridge> [ddnet] u can do it in js? 17:14 < bridge> [ddnet] probably 17:15 < bridge> [ddnet] nope 17:15 < bridge> [ddnet] u can't 17:15 < bridge> [ddnet] can u write chinese tho? 17:15 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/854740996263641138/unknown.png 17:17 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/854741486188625930/unknown.png 17:17 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/854741512096186428/unknown.png 17:17 < bridge> [ddnet] it doesn't make any sense 17:20 < bridge> [ddnet] hmm. didn't know you can italic an emoji 17:20 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/854742228480425984/unknown.png 17:24 < bridge> [ddnet] xd 17:30 < bridge> [ddnet] @jao could you help me out? 17:52 < bridge> [ddnet] @Patiga the codebase includes the schema 17:52 < bridge> [ddnet] https://github.com/ddnet/ddnet-discordbot/blob/master/data/schema.psql 17:54 < bridge> [ddnet] I have created the biggest abomination ever but I think it's good enough for now 17:56 < bridge> [ddnet] 1 \: something regarded with disgust or hatred \: something abominable 17:56 < bridge> [ddnet] what did u do? 17:57 < bridge> [ddnet] I made the worlds ugliest discord bot 17:58 < bridge> [ddnet] :poggers: 18:01 < bridge> [ddnet] yea discord sounds pretty abominable \:) 18:01 < bridge> [ddnet] poor u 18:21 < bridge> [ddnet] > You can now specify "or patterns" inside pattern matches. Previously you could only use | (OR) on complete patterns. E.g. 18:21 < bridge> [ddnet] > 18:21 < bridge> [ddnet] > ```rs 18:21 < bridge> [ddnet] > let x = Some(2u8); 18:21 < bridge> [ddnet] > // Before 18:21 < bridge> [ddnet] > matches!(x, Some(1) | Some(2)); 18:21 < bridge> [ddnet] > // Now 18:21 < bridge> [ddnet] > matches!(x, Some(1 | 2)); 18:21 < bridge> [ddnet] > ``` 18:21 < bridge> [ddnet] looks ambiguous with bitwise or 😦 18:22 < bridge> [ddnet] thanks! 18:28 < bridge> [ddnet] i dont think u can do a bitwise or when pattern matching 18:28 < bridge> [ddnet] nor 1+1 18:28 < bridge> [ddnet] well idk 18:29 < bridge> [ddnet] i doubt they havent considered this 18:29 < bridge> [ddnet] they surely have considered it 18:29 < bridge> [ddnet] im reading the RFC but its a bit verbose 18:29 < bridge> [ddnet] https://github.com/rust-lang/rfcs/blob/master/text/2535-or-patterns.md 18:29 < bridge> [ddnet] but they also allowed `impl Trait` in both argument and return position with different meaning 18:29 < bridge> [ddnet] https://github.com/Learath2/discordbot/commit/16061e046 this commit I'm only showing you because we are all friends here 18:29 < bridge> [ddnet] I also disliked that 18:30 < bridge> [ddnet] I don't think I've ever written something uglier in my life 😛 18:30 < bridge> [ddnet] wdym different meaning 18:30 < bridge> [ddnet] with polling too, absolutely eww 18:31 < bridge> [ddnet] `impl Trait` in argument position means "any object that implements Trait can be passed here" and `impl Trait` in return position means "only one concrete struct implementing Trait can be returned here" 18:31 < bridge> [ddnet] @Learath2 u decided to start learning rust by using async first :monkaS: 18:31 < bridge> [ddnet] there is a major plan to improve it 18:31 < bridge> [ddnet] i saw 18:32 < bridge> [ddnet] @Ryozuki well I didn't have any other project I need to do, anyway my ugly bot is more a result of my poor planning 18:32 < bridge> [ddnet] The next iteration will use a broadcast channel instead of polling everywhere 18:32 < bridge> [ddnet] yeah i guess 18:33 < bridge> [ddnet] (fwiw async works fairly well, they just need to relax the constraints and add some convenience syntax for stuff like streams and clone/moving into async blocks) 18:33 < bridge> [ddnet] u have some kind of global lock? 18:34 < bridge> [ddnet] i find it weird to use a lock around () 18:34 < bridge> [ddnet] usually u open the lock and get a ref to the inside and mutate it 18:34 < bridge> [ddnet] but ur locking just for the sake of it? 18:35 < bridge> [ddnet] It's actually guarding a sqlite table 18:35 < bridge> [ddnet] It's fairly meh, but it's not a resource that has a representation I can lock inside of rust 18:35 < bridge> [ddnet] The next iteration will involve an abstraction around the concept of table to hold the lock 18:35 < bridge> [ddnet] wat? 18:35 < bridge> [ddnet] are u using sqlx to interact with sqlite right 18:36 < bridge> [ddnet] Yes 18:36 < bridge> [ddnet] sqlx should hide everything 18:36 < bridge> [ddnet] u dont need to lock 18:36 < bridge> [ddnet] if u need to lock rust will let u know asking for sync and send 18:36 < bridge> [ddnet] im confused here 18:37 < bridge> [ddnet] Ofc you need to lock, sqlx won't prevent a thread from writing to a table while another is reading it. And rustc will not even know the concept of a table to ask for a sync + send 18:37 < bridge> [ddnet] what are you trying to protect? you're doing an SELECT, then UPDATE that should be atomic together? 18:38 < bridge> [ddnet] One thread might be deleting while another is reading 18:38 < bridge> [ddnet] arent transactions made for that? 18:38 < bridge> [ddnet] that should be no problems as far as I'm aware about sqlite3 18:38 < bridge> [ddnet] ^ 18:38 < bridge> [ddnet] but you might need more guarantees than sqlite3 provides 18:38 < bridge> [ddnet] I'm trying to understand those 18:39 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/854762001439129640/unknown.png 18:40 < bridge> [ddnet] I need the table to not change while the expiry thread is reading it, it can lead to issues if someone issues a manual expiry on the other thread 18:41 < bridge> [ddnet] why dont u put the RwLock around the SqlitePool then? 18:41 < bridge> [ddnet] Well that'd also synchronize all accesses to any table at all 18:41 < bridge> [ddnet] The entire database doesn't need to be locked, just the table 18:42 < bridge> [ddnet] idk why i dont like this 18:42 < bridge> [ddnet] xd 18:42 < bridge> [ddnet] It's the `RwLock<()>` had a chat about it for a while on the rust discord 18:42 < bridge> [ddnet] perhaps it could be achieved within sqlite3 transactions? 18:43 < bridge> [ddnet] yeah 18:43 < bridge> [ddnet] it's just guarding a resource that has no representation inside the code, ideally sqlite would be the provider of this mechanism, but I didn't find one 18:43 < bridge> [ddnet] transactions 18:43 < bridge> [ddnet] Even if there is one I doubt sqlx implements it 18:43 < bridge> [ddnet] ah, the charm of orms? 18:43 < bridge> [ddnet] https://docs.rs/sqlx/0.5.5/sqlx/struct.Transaction.html 18:43 < bridge> [ddnet] u can do it 18:44 < bridge> [ddnet] I need to call, `BEGIN EXCLUSIVE` 18:44 < bridge> [ddnet] apparently a write transaction locks the DB 18:44 < bridge> [ddnet] how does sqlx interact with SQLITE_BUSY? 18:45 < bridge> [ddnet] I honestly don't know and didn't want to dig anymore after I didn't find any mention of locks in sqlx 18:45 < bridge> [ddnet] ah 18:46 < bridge> [ddnet] fwiw I did find table locks in mysql, but didn't find a similar concept for sqlite3 18:47 < bridge> [ddnet] Furthermore in the next iteration I'll probably avoid this issue by using a mpsc channel to a single actual task doing all the sql stuff 18:47 < bridge> [ddnet] yeah channels best 18:47 < bridge> [ddnet] for optimized channels see https://github.com/crossbeam-rs/crossbeam 18:47 < bridge> [ddnet] i know u dislike libs but i like recommending them 18:48 < bridge> [ddnet] 😀 18:48 < bridge> [ddnet] or maybe on a day when I'm less sleep deprived I'll find a way to make the operations themselves safe even if the table state is changing underneath 18:48 < bridge> [ddnet] that would be the best 18:49 < bridge> [ddnet] Hm, doesn't seem to have a mpsc channel 18:49 < bridge> [ddnet] https://docs.rs/crossbeam-channel/0.5.1/crossbeam_channel/ 18:50 < bridge> [ddnet] Mh, I guess they managed to create a mpmc channel that is optimized for mpsc too 18:50 < bridge> [ddnet] > This crate is an alternative to std::sync::mpsc with more features and better performance. 18:50 < bridge> [ddnet] they say this so 18:51 < bridge> [ddnet] mpsc from the standard library is unsound IIRC 18:51 < bridge> [ddnet] I was eyeing `tokio::sync::mpsc` 18:51 < bridge> [ddnet] ah ye 18:51 < bridge> [ddnet] use tokio 18:52 < bridge> [ddnet] I'll take a look at crossbeam too when/if I give this another go 18:52 < bridge> [ddnet] crtossbeam is not async 18:52 < bridge> [ddnet] I've been silly, I really should have dropped this whole php backend shtick instead of messing around with this for so long 18:52 < bridge> [ddnet] https://tokio.rs/tokio/tutorial/channels 18:52 < bridge> [ddnet] nice tut 18:52 < bridge> [ddnet] I should have just made the bot generate the bans file 18:52 < bridge> [ddnet] xD 18:53 < bridge> [ddnet] anyway, I've learned so much doing all this, even if it doesn't help me debug the issue it's trying to solve, I'm happy 18:54 < bridge> [ddnet] 🙂 18:54 < bridge> [ddnet] yeah thats nice 18:55 < bridge> [ddnet] im excited for rocket.rs 0.5 launching this friday 18:55 < bridge> [ddnet] @Learath2 u should try it when it launches 18:55 < bridge> [ddnet] https://rocket.rs/v0.5-rc/news/2021-06-09-version-0.5-rc.1/ 18:59 < bridge> [ddnet] @Ryozuki How is it supposed to be better than actix? 18:59 < bridge> [ddnet] @Learath2 read the getting started 19:00 < bridge> [ddnet] i use actix a lot 19:00 < bridge> [ddnet] and its fine 19:00 < bridge> [ddnet] but i find the idea of rocket is way better 19:01 < bridge> [ddnet] implementing a middleware in actix is rly bad, on rocket you implement a fairing or a guard and its easier to do so 19:01 < bridge> [ddnet] rocket has builtin config management already too 19:01 < bridge> [ddnet] it also wraps diesel which is sync in the async enviroment of rocket 19:02 < bridge> [ddnet] look at it like this, actix is old and has some baggage and rocket is shiny and innovative 19:02 < bridge> [ddnet] idk 19:02 < bridge> [ddnet] just reading their guide makes me want to use it 19:02 < bridge> [ddnet] xd 19:03 < bridge> [ddnet] new good? 19:03 < bridge> [ddnet] new as in using more rust features that make developing website easier 19:03 < bridge> [ddnet] websites* 19:03 < bridge> [ddnet] actix has had some questionable use of unsafe 19:03 < bridge> [ddnet] IIRC 19:03 < bridge> [ddnet] yeah that too 19:03 < bridge> [ddnet] it had some drama in the past 19:03 < bridge> [ddnet] but its fixed/getting fixed 19:03 < bridge> [ddnet] since the original author is not here 19:04 < bridge> [ddnet] who said "this commit is not creative" or something like that to a pr fixing a unsoundness issue 19:04 < bridge> [ddnet] xd 19:04 < bridge> [ddnet] https://www.reddit.com/r/rust/comments/8wlkbe/actixweb_has_removed_all_unsound_use_of_unsafe_in/ 19:04 < bridge> [ddnet] https://www.reddit.com/r/rust/comments/epyyky/more_actix_drama/ 20:57 < bridge> [ddnet] https://news.ycombinator.com/item?id=27529768 20:57 < bridge> [ddnet] > 20:57 < bridge> [ddnet] > weinzierl 2 hours ago [–] 20:57 < bridge> [ddnet] > 20:57 < bridge> [ddnet] > Excerpt from the abstract: 20:57 < bridge> [ddnet] > 20:57 < bridge> [ddnet] > "This paper presents the first publicly available cryptanalytic attacks on the GEA-1 and GEA-2 algorithms." 20:57 < bridge> [ddnet] > 20:57 < bridge> [ddnet] > [..] 20:57 < bridge> [ddnet] > 20:57 < bridge> [ddnet] > "This unusual pattern indicates that the weakness is intentionally hidden to limit the security level to 40 bit by design." 20:57 < bridge> [ddnet] > 20:57 < bridge> [ddnet] > So in other words: GPRS was intentionally backdoored. 20:57 < bridge> [ddnet] i think this stuff is used on 5G, dont quote me on that tho 20:57 < bridge> [ddnet] i think this stuff is used on 5G 20:57 < bridge> [ddnet] ©Ryozuki 20:57 < bridge> [ddnet] basically, they found a backdoor 20:58 < bridge> [ddnet] used to spy on u 20:59 < bridge> [ddnet] > GPRS is the mobile data standard for GSM mobile phones. It's from the 2G era, and is old and slow. GEA-1 is an encryption algorithm used with GPRS. 21:01 < bridge> [ddnet] https://github.com/ddnet/ddnet-discordbot/blob/master/data/schema.psql 21:45 < bridge> [ddnet] thanks 21:54 < bridge> [ddnet] :thonk: 21:54 < bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/854811292521725982/unknown.png 22:32 < bridge> [ddnet] Let me try asking here too but I doubt you'd have a better idea, @heinrich5991 &&|| @Ryozuki. I need one task to die later than the others, can you think of a way to wait on the other tasks? 22:33 < bridge> [ddnet] I asked on the tokio discord and one of the core developers suggested the very meh hack of abusing a mpsc channel