06:37 <+bridge> [ddnet] @heinrich5991 found another case where a player doesn't have server list at home just like in netcafe. he has 360 installed. 08:51 <@deen> Can you try opening a ticket/report at norton/360? 08:52 <@deen> Probably the only way to get around antivirus software miscategorizing us 14:24 <@heinrich5991> @Ts懒散 is it https://www.360totalsecurity.com/? 14:47 <+bridge> [ddnet] Oh, I thought it's Norton 360 17:51 <+bridge> [ddnet] ChillerDragon: 17:51 <+bridge> [ddnet] chillerdragon: 18:34 <+bridge> [ddnet] Seems outside of js no language really does async well yet 18:34 <+bridge> [ddnet] ah, does JS do async well nowadays? no callbacks anymore? 18:35 <+bridge> [ddnet] Well I'm yet to hit any actually gamebreaking issues and their usage is very straightforward 18:36 <+bridge> [ddnet] they had the semantic that they always evaluate to end, unless you abort them? 18:36 <+bridge> [ddnet] Though the problem they are solving is much easier than the problem rust and C++ try to solve. A compiled language makes it much more annoying to work with 18:37 <+bridge> [ddnet] image.png 18:37 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859834996717518878/image.png 18:37 <+bridge> [ddnet] who try hack me 18:37 <+bridge> [ddnet] @heinrich5991 hm, is that really something unexpected? 18:37 <+bridge> [ddnet] someone else also reported this, might be some manual map release script gone wrong, ZombieToad 18:38 <+bridge> [ddnet] @Learath2 I think rust futures don't have this semantic 18:38 <+bridge> [ddnet] Rust futures don't really have any semantics of their own really, it's all kinda up to the executor 18:38 <+bridge> [ddnet] I wasn't trying to say that either is bad, just trying to understand what they do 18:39 <+bridge> [ddnet] I'm not quite sure what the alternative is tbf, if you don't abort them they kinda have to run to completion, no? 18:40 <+bridge> [ddnet] you could only start running them once you await them in a way 18:40 <+bridge> [ddnet] Aaah, I see what you mean, yeah no js promises to just start immediately 18:41 <+bridge> [ddnet] Oh actually I bet you can get this behaviour, let me check, now I'm curious aswell 😄 18:43 <+bridge> [ddnet] i think callbacks are a think of the past, u use Promises now 18:44 <+bridge> [ddnet] u chain .then() and stuff 18:44 <+bridge> [ddnet] or just await 18:44 <+bridge> [ddnet] Yeah callbacks are pretty dead, I wonder if promises run without being awaited though 18:44 <+bridge> [ddnet] in rust u have to await them 18:44 <+bridge> [ddnet] or they never run 18:44 <+bridge> [ddnet] yep 18:45 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859837101742096385/promises.png 18:48 <+bridge> [ddnet] uhm 18:48 <+bridge> [ddnet] .then()? doesn't it have something like await? 18:48 <+bridge> [ddnet] it does 18:48 <+bridge> [ddnet] u can use both ways 18:48 <+bridge> [ddnet] It has await and it has .then 18:49 <+bridge> [ddnet] because with .then you suddenly lose all your normal control structures 18:49 <+bridge> [ddnet] nice 🙂 18:49 <+bridge> [ddnet] but i found out with then its easier to transform a value 18:49 <+bridge> [ddnet] into another promise 18:49 <+bridge> [ddnet] e.g deserialization 18:50 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859838398134616074/unknown.png 18:50 <+bridge> [ddnet] this is typescript tho 18:51 <+bridge> [ddnet] `(method) Api.list_users(query: UserQuery): Promise>` 18:51 <+bridge> [ddnet] xd 18:51 <+bridge> [ddnet] then second argument handles rejection too 18:52 <+bridge> [ddnet] the throw should be a return tho 18:52 <+bridge> [ddnet] my bad 18:53 <+bridge> [ddnet] @heinrich5991 yep js promises do execute immediately, even if you never await them, I didn't know this 🙂 18:53 <+bridge> [ddnet] `(method) Api.list_users(query: UserQuery): Promise>` 18:53 <+bridge> [ddnet] https://262.ecma-international.org/6.0/#sec-promise-executor if you want to take a look 18:53 <+bridge> [ddnet] I haven't read the js spec at all so far 18:53 <+bridge> [ddnet] I can try to have a look 18:53 <+bridge> [ddnet] thats quite the big document 18:54 <+bridge> [ddnet] Someone made a lazy promise too btw, it just defers the creation of the actual promise until you call .then or .catch once 18:57 <+bridge> [ddnet] other way around is probably also possible? 18:57 <+bridge> [ddnet] Oh and there are async functions, those don't get executed immediately either 18:58 <+bridge> [ddnet] hum? 18:58 <+bridge> [ddnet] wym by other way around? 18:59 <+bridge> [ddnet] making a lazy promise non-lazy 18:59 <+bridge> [ddnet] by submitting it to the runtime 18:59 <+bridge> [ddnet] and just waiting for the result in the proxy future 18:59 <+bridge> [ddnet] I mean unless you `await myasyncfunction()` nothing will execute yet 19:00 <+bridge> [ddnet] what is the difference between an async function and a Future? 19:01 <+bridge> [ddnet] hm, as soon as you call `.then` it will create a real promise, which starts executing immediately 19:01 <+bridge> [ddnet] yes 19:03 <+bridge> [ddnet] Well async functions are sort of like templates for Promises if you will, when you call them they will return a promise 19:03 <+bridge> [ddnet] hmmm 19:04 <+bridge> [ddnet] so promises only start executing once you call then? 19:06 <+bridge> [ddnet] "then", not "them" 19:06 <+bridge> [ddnet] As soon as you call the constructor `Promise(executor)` it will call `executor` 19:07 <+bridge> [ddnet] but async functions also return Future(-like?) objects that only start executing once you call then? 19:09 <+bridge> [ddnet] Ah, no async functions also return normal promises that immediately start executing. I guess it's just syntax sugar but you are calling the executor in this case, which makes it more obvious that it is indeed being run right now 19:11 <+bridge> [ddnet] Do you remember where you spotted this btw? Was it serenity or did you see something else? 19:12 <+bridge> [ddnet] I was making my own but it is quite a bit annoying to make it as flexible as I want at which point I might aswell use someone elses 19:15 <+bridge> [ddnet] @Learath2 I meant the fact that discord has support for / commands 19:15 <+bridge> [ddnet] not actual support for that in any rust discord framework or so 19:18 <+bridge> [ddnet] ah, hm, maybe I'll spend one more day on it, see if there is a way to make this pretty, if not I'll I guess just make the entire thing in js 19:19 <+bridge> [ddnet] (well ts ofc, just using js is insanity) 19:19 <+bridge> [ddnet] I desperately need to learn some js/ts 19:19 <+bridge> [ddnet] my frontend skills suck 19:20 <+bridge> [ddnet] eh modern frontend these days dont even use vanilla js functions 19:20 <+bridge> [ddnet] Vue is fun to learn and it's not too pushy with it's ideology 19:20 <+bridge> [ddnet] so it u need to learn every new framework 19:20 <+bridge> [ddnet] so u need to learn every new framework 19:20 <+bridge> [ddnet] i have fun using react, specially react hooks 19:21 <+bridge> [ddnet] way less boilerplate code than react with class compoennts 19:21 <+bridge> [ddnet] components 19:21 <+bridge> [ddnet] There is one large advantage to react though, if you learn react, you also mostly know react-native. Which means you are a certified appdeveloper too 😄 19:21 <+bridge> [ddnet] even css is inside js now 19:21 <+bridge> [ddnet] u dont need to leave a js file 19:21 <+bridge> [ddnet] any app that I use that uses react-native? 19:22 <+bridge> [ddnet] so that I can evaluate whether it's garbage, performance-wise 19:22 <+bridge> [ddnet] A bit of instagram is now react-native iirc 19:22 <+bridge> [ddnet] :monkaS: 19:22 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859846294390702101/unknown.png 19:22 <+bridge> [ddnet] js will be everything 19:22 <+bridge> [ddnet] Airbnb is react-native, (they also contribute very high quality libraries back to the community) 19:22 <+bridge> [ddnet] :monkaS: 19:23 <+bridge> [ddnet] Ah, this very app we are chatting on uses react-native too apparently, just checked 😄 19:23 <+bridge> [ddnet] well, discord is garbage, I wnat to produce higher quality software 19:23 <+bridge> [ddnet] it's the first thing that starts to lag on my computer 19:25 <+bridge> [ddnet] well idk if u can with js 19:25 <+bridge> [ddnet] You definitely can, I honestly am very happy with the react native apps I'm using on the phone 19:25 <+bridge> [ddnet] they don't have that janky made in indian sweatshop webapp bolted into a webview feeling and they perform fairly decently 19:27 <+bridge> [ddnet] The ability to just use native UI components really hides away the js running behind the scenes 20:44 <+bridge> [ddnet] https://scattered-thoughts.net/writing/assorted-thoughts-on-zig-and-rust/ interesting read 20:46 <+bridge> [ddnet] i really like the way this is structured 20:46 <+bridge> [ddnet] no frills just one comparison after the other 20:47 <+bridge> [ddnet] this makes me really want to learn zig 20:48 <+bridge> [ddnet] i shouldn't assume zig and nim has similar goals right? 20:48 <+bridge> [ddnet] His feelings are a bit similar to mine, rust does kinda require you to learn a lot in a very short amount of time to start writing useful things 20:48 <+bridge> [ddnet] i think zig is more focused on safety than nim is from what i remember 20:49 <+bridge> [ddnet] zig is also aiming to be a lower level language, it's more aimed to be like a step up from C 20:50 <+bridge> [ddnet] I like zigs approach to asynchronous programming too, the compiler can infer whether your functions can be async or not 20:51 <+bridge> [ddnet] that's fucking wild 20:51 <+bridge> [ddnet] is it super implicit? or is there some more technical reasons for running it async vs not 20:53 <+bridge> [ddnet] wym by super implicit? 20:55 <+bridge> [ddnet] ```fn send(addr: net.Address) !void { 20:55 <+bridge> [ddnet] var socket = try net.tcpConnectToAddress(addr); 20:55 <+bridge> [ddnet] defer socket.close(); 20:55 <+bridge> [ddnet] _ = try socket.write("message"); 20:55 <+bridge> [ddnet] }``` 20:57 <+bridge> [ddnet] This function is normally blocking, but if you set `io_mode = .evented` the socket will be opened non blocking 21:00 <+bridge> [ddnet] so not as implicit i think because you have to say `defer` right? 21:06 <+bridge> [ddnet] @Learath2 do u remember the guy u discussed in tokyo discord? 21:06 <+bridge> [ddnet] he was a zig fanatic 21:06 <+bridge> [ddnet] and went on rust reddit to preach it 21:06 <+bridge> [ddnet] :monkalaugh: 21:07 <+bridge> [ddnet] wait i want to understand 21:07 <+bridge> [ddnet] what's the point of `_ = ` if the return type is `void` 21:08 <+bridge> [ddnet] also what's `!` in return type, is that like, force? 21:08 <+bridge> [ddnet] at this point u might just learn zig 21:08 <+bridge> [ddnet] xd 21:08 <+bridge> [ddnet] i would learn it but im 2 lazy, ill wait to see if it becomex more widespread 21:08 <+bridge> [ddnet] my assumption is that `try` requires you to assign its result 21:09 <+bridge> [ddnet] which i guess makes sense 21:11 <+bridge> [ddnet] > The Rust Language Server is usable. It works well on valid code, but struggles to deal with invalid states during editing. It can also be painfully slow in large codebases - when working on materialize it was often 3-5x slower than just running cargo check. 21:11 <+bridge> [ddnet] > 21:11 <+bridge> [ddnet] > I haven't tried the intellij rust plugin or rust-analyzer. 21:11 <+bridge> [ddnet] > 21:11 <+bridge> [ddnet] > I haven't yet tried the Zig Language Server but it appears to be fairly complete. 21:11 <+bridge> [ddnet] why 21:11 <+bridge> [ddnet] the defer is to cleanup at the end 21:11 <+bridge> [ddnet] why he hasnt tried the most complete language server out there 21:11 <+bridge> [ddnet] damned it be RLS 21:11 <+bridge> [ddnet] When the function returns in zig all the defers are executed 21:11 <+bridge> [ddnet] ah its copied from golang 21:11 <+bridge> [ddnet] tho 21:11 <+bridge> [ddnet] i think it has some drawbacks 21:12 <+bridge> [ddnet] o 21:12 <+bridge> [ddnet] or gotchas 21:12 <+bridge> [ddnet] > I still haven't internalized the full rule-set of rust enough to be able predict whether a design in my head will successfully compile. I don't remember the order in which methods are resolved during autoderefencing, or how module visibility works, or how the type system determines if one impl might overlap another or be an orphan. There are frequent moments where I know what I want the machine to do but struggle to encode it into tr 21:12 <+bridge> [ddnet] It probably does compared to RAII, RAII is usually a more robust system 21:12 <+bridge> [ddnet] hah, I'm further than that! 21:13 <+bridge> [ddnet] > On the other hand, we can't type-check zig libraries which contain generics. We can only type-check specific uses of those libraries. 21:13 <+bridge> [ddnet] hm, I considered this an error in C++ tbh 21:13 <+bridge> [ddnet] *mistake 21:13 <+bridge> [ddnet] that templates are just code substitution, plus SFINAE 21:14 <+bridge> [ddnet] > of the unfortunately named release-fast mode which disables all runtime safety checks. 21:14 <+bridge> [ddnet] I like rust's way of making things longer or more annoying to type where other options should be preferred 21:15 <+bridge> [ddnet] lol unfortunately named release-fast mode 21:15 <+bridge> [ddnet] ah nice, it has slices, that's a major step up from C 🙂 21:15 <+bridge> [ddnet] The way rust verifies traits makes wrapping functions with trait bounds rather annoying 21:17 <+bridge> [ddnet] I can imagine this. do you have a concrete example anyway? 🙂 21:21 <+bridge> [ddnet] Well I had something like `fn new(name: String, cb: F) where F: Fn(Arc, String) -> Fut + 'static, Fut: Future + 'static {}` and I had another function `fn register` which needs to call new. Now I need to repeat my rather long traits again 21:25 <+bridge> [ddnet] I see 21:35 <+bridge> [ddnet] !T means either an error or T 21:35 <+bridge> [ddnet] Same as `Option` in rust 21:35 <+bridge> [ddnet] OH ok 21:39 <+bridge> [ddnet] If a function can return an error type, you may not ignore it 21:39 <+bridge> [ddnet] thus you assign to _ to discard 21:39 <+bridge> [ddnet] so that avoids the implicit return 21:39 <+bridge> [ddnet] The problem with zig is that it's fairly immature, not enough funding/userbase there, so it's slow too 😦 21:40 <+bridge> [ddnet] ah 21:40 <+bridge> [ddnet] is nim much better? 21:40 <+bridge> [ddnet] is nim much better? (in that sense) 21:40 <+bridge> [ddnet] they have similar userbases, maybe nim is a tad larger 21:40 <+bridge> [ddnet] i think nim is less famous than zig 21:40 <+bridge> [ddnet] i thought nim was larger 21:40 <+bridge> [ddnet] they are the same order of magnitude tho 21:40 <+bridge> [ddnet] i dont see it mentioned anywhere 21:40 <+bridge> [ddnet] but maybe its just me 21:41 <+bridge> [ddnet] in rust lot of ppl mention zig so 21:41 <+bridge> [ddnet] maybe this is a bad source of popularity but 21:41 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859881301922021376/unknown.png 21:41 <+bridge> [ddnet] slant xd 21:41 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859881459711213608/unknown.png 21:41 <+bridge> [ddnet] i dont trust this site 21:42 <+bridge> [ddnet] LOL 21:42 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859881529186451456/unknown.png 21:42 <+bridge> [ddnet] for the record 21:42 <+bridge> [ddnet] rust is at 1.53.0 21:42 <+bridge> [ddnet] xd 21:43 <+bridge> [ddnet] it says nim is a better systems programming language :feelsbadman: 21:43 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859881769335390248/unknown.png 21:44 <+bridge> [ddnet] nim is garbage collected lmao 😄 21:44 <+bridge> [ddnet] rekt 21:45 <+bridge> [ddnet] rust has 144k readers, nim 4.5k, zig 3.3k 21:45 <+bridge> [ddnet] on reddit 21:45 <+bridge> [ddnet] cpp 188k 21:46 <+bridge> [ddnet] but rust has most online users 21:46 <+bridge> [ddnet] xd 21:56 <+bridge> [ddnet] rust is more hip amongst the younguns who are more online 21:58 <+bridge> [ddnet] :monkaS: 22:01 <+bridge> [ddnet] rust users be like "get with the lifetimes" 22:03 <+bridge> [ddnet] nice one 22:03 <+bridge> [ddnet] ths 22:03 <+bridge> [ddnet] thx 22:03 <+bridge> [ddnet] ill be here all week 22:03 <+bridge> [ddnet] and the week after 22:03 <+bridge> [ddnet] and the week after that 22:03 <+bridge> [ddnet] ok 22:04 <+bridge> [ddnet] i just realized other countries probably dont have the idiom "ill be here all week" after telling a bad joke 22:05 <+bridge> [ddnet] ups 22:08 <+bridge> [ddnet] oh another interesting thing about zig is its first class support for cross compiling 22:08 <+bridge> [ddnet] https://ziglang.org/learn/overview/#cross-compiling-is-a-first-class-use-case 22:08 <+bridge> [ddnet] It can do all these targets out of the box with no messing around with 22:08 <+bridge> [ddnet] you just pick the triplet you are targetting and it will give you executables 22:08 <+bridge> [ddnet] https://actually.fyi/posts/zig-makes-rust-cross-compilation-just-work/ 22:08 <+bridge> [ddnet] :monkalaugh: 22:09 <+bridge> [ddnet] I'm considering looking into one last language this week, Go 22:09 <+bridge> [ddnet] u only need 1 day to learn go 22:09 <+bridge> [ddnet] its stupidly easy 22:09 <+bridge> [ddnet] trust me 22:09 <+bridge> [ddnet] It looks amazing for async work, it definitely deserves a try 22:10 <+bridge> [ddnet] ok but the lead dev of zig is kind of a cutie 22:10 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/859888621455409162/106511.png 22:10 <+bridge> [ddnet] @Learath2 a good read tho https://fasterthanli.me/articles/i-want-off-mr-golangs-wild-ride 22:10 <+bridge> [ddnet] i think the tortoiseshell frames carry him tho 22:18 <+bridge> [ddnet] I already read this, it's a bit disappointing yes 22:47 <+bridge> [ddnet] :kek: 22:49 <+bridge> [ddnet] i decided it's just the glasses 22:49 <+bridge> [ddnet] i am considerably less emotionally invested in this man 22:49 <+bridge> [ddnet] the real test is if @TsFreddie agrees