00:03 <+bridge> [ddnet] I have found a feature all programming languages should have, breaking out of any arbitrary block 00:04 <+bridge> [ddnet] the usual deep nesting of if statements is just not easy to read 00:04 <+bridge> [ddnet] the usual advice from "seasoned" veterans would be to move things to a function, yet if we had a generic break, it'd look much cleaner 00:05 <+bridge> [ddnet] agree for normal imperative languages 00:05 <+bridge> [ddnet] python lacks it, c/c++ lack it 00:05 <+bridge> [ddnet] not sure about go 00:05 <+bridge> [ddnet] I somehow feel like one day you guys will be so tired of fighting with all the languages you will for real create own one 00:05 <+bridge> [ddnet] I don't know of any language that has it tbh 00:05 <+bridge> [ddnet] rust, java 00:05 <+bridge> [ddnet] Even better would be a generic break out of n layers of blocks 00:06 <+bridge> [ddnet] @heinrich5991 I don't think java has one 00:06 <+bridge> [ddnet] ah, I probably misunderstood what you mean 00:06 <+bridge> [ddnet] you also want to break out of bare `{}` blocks 00:06 <+bridge> [ddnet] yes, any block 00:06 <+bridge> [ddnet] wasm has that 😄 00:07 <+bridge> [ddnet] you can "emulate" it in languages which have break out of any loop 00:07 <+bridge> [ddnet] well it might be because i've been looking at way too much assembly the last couple days, but error handling looks so much more elegant with a flag and break 00:08 <+bridge> [ddnet] do{}while(false)? 00:08 <+bridge> [ddnet] ``` 00:08 <+bridge> [ddnet] while(1) { 00:08 <+bridge> [ddnet] if(false) break; // you can break here 00:08 <+bridge> [ddnet] break; 00:08 <+bridge> [ddnet] } 00:08 <+bridge> [ddnet] ``` 00:08 <+bridge> [ddnet] or that 00:08 <+bridge> [ddnet] ah yea, also with `do {} while()` (if you support labeled break) 00:09 <+bridge> [ddnet] Hm, might even be better then exceptions 00:11 <+bridge> [ddnet] ``` 00:11 <+bridge> [ddnet] { 00:11 <+bridge> [ddnet] if(someissue){ 00:11 <+bridge> [ddnet] error = true; 00:11 <+bridge> [ddnet] break; 00:11 <+bridge> [ddnet] } 00:11 <+bridge> [ddnet] ... 00:11 <+bridge> [ddnet] } 00:11 <+bridge> [ddnet] if(error) 00:11 <+bridge> [ddnet] handleerror(); 00:11 <+bridge> [ddnet] noooo 00:11 <+bridge> [ddnet] stupid discod 00:11 <+bridge> [ddnet] discord* 00:15 <+bridge> [ddnet] https://internals.rust-lang.org/t/pre-rfc-early-exit-from-any-block/5372 00:15 <+bridge> [ddnet] rust doesn't seem to have it, and apparently java can do it with labelled blocks 00:17 <+bridge> [ddnet] java can break out of any (labeled) block? 00:17 <+bridge> [ddnet] TIL 00:20 <+bridge> [ddnet] @Learath2 apparently implemented in rust, but not stable yet: https://github.com/rust-lang/rust/issues/48594 00:28 <+bridge> [ddnet] pf, so much discussion for such a simple feature 00:28 <+bridge> [ddnet] I wonder if it'll ever get stable 00:28 <+bridge> [ddnet] dunno, also just read that whole discussion ^^ 00:49 <+bridge> [ddnet] in go u would do ```go 00:49 <+bridge> [ddnet] for { 00:49 <+bridge> [ddnet] // stuff 00:49 <+bridge> [ddnet] break 00:49 <+bridge> [ddnet] } 00:49 <+bridge> [ddnet] ``` 00:50 <+bridge> [ddnet] btw go doesnt have while 00:50 <+bridge> [ddnet] can you break out of outer loops in go? 00:50 <+bridge> [ddnet] you can break with a label 00:50 <+bridge> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/707001310033215498/unknown.png 00:51 <+bridge> [ddnet] ah, like java 00:51 <+bridge> [ddnet] and I guess go's while loop is just a while loop where the keyword was replaced with for? or can you truly not write a while loop? 00:51 <+bridge> [ddnet] you can do 00:52 <+bridge> [ddnet] for x <= 2 {} 00:52 <+bridge> [ddnet] for x := 0; x < 10; x++{} 00:52 <+bridge> [ddnet] i like how modern languages tend to remove unnecessary stuff 00:52 <+bridge> [ddnet] like () around if 00:52 <+bridge> [ddnet] also 00:52 <+bridge> [ddnet] for x := range a {} 01:42 <+bridge> [ddnet] https://www.sansbullshitsans.com/ 15:32 <+bridge> [ddnet] is it possible to add a feature that insta kills you whenever you touch the freeze? obvioiusly a toggle feature. would be nice for solo runs, so that you dont have to press kill every time u die. especially for gores cause there is no teleport but freeze 15:34 <+bridge> [ddnet] oh mh. some maps you touch the freeze and stilll are not fail. idk if there can be exceptions or somee rules for that 15:41 <+bridge> [ddnet] I don't think it would be a good feature, I'd only work in certain solo maps 16:01 <+ChillerDragon> @Shyzo yes thats awesome i added that to my client once with a timer so only if you fail at after spawning it kills you it was awesome for speedrunning 16:01 <+ChillerDragon> especially when you have a far a way suicide key like i do (k) and you keep failling at the first 10 secs 16:03 <+bridge> [ddnet] just bind kill to `q`, like I do 😛 16:03 <+bridge> [ddnet] very easy to reach 16:05 <+ChillerDragon> yes thats the problem very easy to accidentally kill when you have fat jumpy fingers like i do 16:06 <+ChillerDragon> also prefer to use the reachable keys for binds i have to use while playing 16:14 <+bridge> [ddnet] I have it on letter H 16:14 <+bridge> [ddnet] It's pretty close to my finger 16:14 <+bridge> [ddnet] But not that close to press it by accident 16:25 <+bridge> [ddnet] @[quakenet] ChillerDragon#0000 yes exactly, that would be awesome. 16:26 <+bridge> [ddnet] i have it on i and always have to leave either my mouse or my usual hand position. a little annoying. so I think the way @ChillerDragon did it is a good solution 16:29 <+bridge> [ddnet] i press `k`, then confirm the kill with `o`, or cancel the kill with `k` again 17:06 <+bridge> [ddnet] just use kill on/off bind 17:06 <+bridge> [ddnet] r is kill 17:06 <+bridge> [ddnet] press k to toggle kill on/off 17:12 <+bridge> [ddnet] kill on lctrl 17:12 <+bridge> [ddnet] it's nearly impossible to "accindentally" press ctrl 17:14 <+bridge> [ddnet] Hii 17:15 <+bridge> [ddnet] Is it possible to turn off force vote in the vote menu? 17:17 <+bridge> [ddnet] @fokkonaut idea? 17:17 <+bridge> [ddnet] (0.7) 17:20 <+bridge> [ddnet] You cant remove that button but you can remove its action on the serverside 17:23 <+bridge> [ddnet] Well so I have to edit the code? 19:20 <+bridge> [ddnet] Just disallow force vote command for moderators? 21:34 <+bridge> [ddnet] If I disable vote in f2 its still there @fokkonaut 21:35 <+bridge> [ddnet] I told you you cant remove it but you can remove the function server side 21:35 <+bridge> [ddnet] It wont do anything if you press it without access 21:35 <+bridge> [ddnet] try somy by yourself before