12:47 < BotoX> I hate X11 12:47 <@matricks> what now? 12:48 < BotoX> There seems to be no way for me to detect if a window that I am listening to events exits 12:48 < BotoX> there are FocusIn and FocusOut events but no close event 12:49 < BotoX> the WM_DELETE_WINDOW event can't be accessed if you don't own the window either 12:49 < BotoX> https://stackoverflow.com/questions/1157364/intercept-wm-delete-window-on-x11 12:49 < BotoX> And I have no idea what the fuck that guy is doing 12:51 <@matricks> what are you trying todo? 12:52 < BotoX> stop my program that listens to keyboard input on another window 12:52 < BotoX> when that other window exits 12:52 <@matricks> why do you wanna listen to it's keyboard events? 12:52 < BotoX> I'm doing some audio magic and made my own push to talk for a game 12:53 < BotoX> a process in the background starts and reads keyboard input on the game 12:53 < BotoX> and mutes/unmutes a stream 12:53 < BotoX> but it doesn't know when to exit lol 12:53 < BotoX> I could get the process id and watch /proc 12:59 < BotoX> screw X, I'll just do it with the pid 12:59 < BotoX> insane ... 18:09 < dhkmt> sup 18:12 < dhkmt> sup 18:12 < heinrich5991> hey 18:13 < dhkmt> are you able to teach me the gui/rect system by teeworlds? 18:15 < heinrich5991> uhm 18:16 < dhkmt> its hard to understand 18:16 < heinrich5991> that's a pretty broad topic 18:16 < Sadale> dhkmt, tbh, you're supposed to figure it out yourself 18:16 < heinrich5991> not sure where I'd even start 18:16 < dhkmt> Sadale its too hard for me alone 18:16 < heinrich5991> maybe it'd be helpful to know that rects are just that, rects 18:16 < Sadale> Oh well. :( 18:16 < heinrich5991> (i.e. x, y coordinates together width and height) 18:17 < dhkmt> yea but i mean the dynamic stuff 18:17 < dhkmt> as example in menu_settings.cpp etc 18:19 < heinrich5991> the only other insight that I can give about that UI stuff is that the whole code is called each time it's rendered to the screen 18:19 < dhkmt> i know 18:20 < heinrich5991> otherwise, I'm probably not much of a help – and additionally I am going to eat dinner now 18:20 < dhkmt> ok 18:21 < dhkmt> as example http://puu.sh/jwp02/f0eb061abf.png i don't the exact way for positioning in this code.. which width? height? x? y? whats weird. 19:21 < BotoX> has anyone here played with python asyncio yet 19:22 <@matricks> I'm trying to stop using dynamic typed languages :) 19:22 < BotoX> I'm using asyncore for two projects and can't seem to find good examples for asyncio, the documentation is huge but I can't find much useful in there lol 19:27 <@matricks> umf 19:27 <@matricks> my projects are too small to test some bam stuff on :/ 19:36 <@matricks> 1000x teeworlds seems to slow stuff down :D 19:36 <@matricks> bah, stupid linux system fs being fast 19:50 <@minus> BotoX: yes, i have 19:50 <@minus> BotoX: https://gogs.sr.ht/minus/urlstream 19:50 < BotoX> asyncore is a lot more sane imo lol 19:51 <@minus> i've had the exact opposite experience, couldn't get shit together with asyncore 19:51 < BotoX> I am struggling to find examples for asyncio 19:51 <@minus> well, what do you want to do 19:51 <@minus> i tihnk it greatly depends on that 19:51 < BotoX> idk port my code over to asyncio since I need some features of it :V 19:51 < BotoX> I have pyinotify in there 19:52 < BotoX> for reading a logfile 19:52 < BotoX> and a tcp server 19:52 <@minus> i did web socket server as main entry point. oh, and a redis subscriber 19:52 <@minus> sounds doable 19:52 < BotoX> https://stackoverflow.com/questions/26414052/watch-for-a-file-with-asyncio 19:52 < BotoX> second answer edit 19:52 < BotoX> noice 19:54 <@matricks> careful, filewatches under windows sucks 19:54 <@minus> should do it, plus an extra "thread" with loop.create_server 19:54 <@matricks> just so you know 19:54 < BotoX> thankfully it only has to run on linux :p 19:54 <@minus> well matricks, it's inotify, so it's linux only anyway 19:54 * matricks does some benchmarking 19:54 <@minus> whatcha benching? 19:54 <@matricks> bam 19:55 <@minus> oh, no Rustperiments 19:55 <@minus> you got me excited there for a moment 19:55 <@minus> have you seen Nim, matricks? 19:55 <@matricks> yap 19:56 <@minus> (n)impressions? 19:56 < heinrich5991> a modern C 19:57 <@matricks> minus: not looked that closly, but what I remember that it isn't enough of a change to motivate a change :) 19:59 <@matricks> I'm really impressed with rust and the safty that they have built into the language 19:59 <@minus> rust seems quite hard to me though 19:59 <@matricks> C is quite hard if you want to do it safely :) 20:01 <@matricks> there is some new stuff to learn yes, but it's kinda stuff that you keep in your head while programming c/c++ 20:01 <@matricks> just that the compiler complains when you miss stuff :) 20:14 < heinrich5991> but then there are a few things that Rust cannot do currently 20:15 < heinrich5991> (more complex invariants, like a pointer to an element of a vector of the same structs) 20:15 <@matricks> huh? 20:17 < heinrich5991> e.g., you have struct Foobar { vec: Vec, part: &[u8] }, where part points into vec. the struct would need to be immutable. 20:17 < BotoX> minus, oh and I also have a queue that gets new items added to it, with asyncore I used the filehandle in the queue to poll it, I think with asyncio there is a better way? 20:18 <@matricks> ok 20:18 <@matricks> heinrich5991: then there is a question why you would do that :) 20:18 < heinrich5991> reading a teeworlds datafile 20:19 <@matricks> use and offset/index 20:19 <@matricks> *an 20:19 < heinrich5991> DatafileInfo { everything_up_to_data: Vec, header: &Header, item_types: &[ItemType], ... } 20:20 < heinrich5991> yea, but that incurs a bounds check on each access 20:20 <@matricks> or go unsafe 20:20 < heinrich5991> yea, that works. but going unsafe is not the reason I use rust :) 20:21 <@matricks> no, but if you gonna do weird stuff like how I structured the datafiles, you might wanna 20:21 <@matricks> and for safety, those might not be the best way to go about it so 20:22 < heinrich5991> my current way to do it is allocate multiple times instead 20:22 < heinrich5991> once for the item offsets, item types, the items, etc. 20:22 < heinrich5991> not as minimal as the teeworlds code in allocations and system calls 20:22 < heinrich5991> but I guess the allocations don't matter so much 20:27 <@minus> BotoX: dunno if it has blocking queues, it might. gevent has that :3 20:28 < BotoX> I just want to call a function when the queue has new items ~_~ 20:29 <@minus> if you wanna process them sequencially you'll need a loop to pop them. otherwise you can just asyncio.async(process_the_shit(lol)) 20:35 < BotoX> noice log reading works! 20:35 < BotoX> that's one out of four xd 20:35 < BotoX> now that I looked through the code again ^^ 20:35 < BotoX> Also is there something like /* */ in python ._. 20:36 < LittleWhite> Yes 20:36 < LittleWhite> ``` 20:36 < BotoX> oh noice 20:37 < BotoX> ``` 20:37 < BotoX> ^ 20:37 < BotoX> SyntaxError: invalid syntax 20:37 < BotoX> :v 20:38 < BotoX> or just ''' 20:38 < BotoX> so it makes it a string lol 20:38 <@minus> yep 20:38 <@minus> that works 20:38 < BotoX> haha nice 20:38 <@minus> """ too 20:38 < BotoX> yeah 20:40 < LittleWhite> sorry for the mistake 20:41 < BotoX> my tcp server for asyncore, https://p.botox.bz/egis.py this will look very different on asyncio, lets see 20:42 < heinrich5991> there is ` in python 2 :) 20:43 < BotoX> oh yeah, I am using python3 20:43 < heinrich5991> `expr` means the same as repr(expr) 20:44 <@minus> yeah, with asyncio you're not gonna be implementing interfaces 20:44 <@minus> heinrich5991: i thought it was eval? 20:45 < heinrich5991> `repr` – '' 20:45 < heinrich5991> so it seems to be repr 20:45 <@minus> mk 20:49 < BotoX> https://gist.github.com/gregvish/7665915 20:49 < BotoX> this looks better than the examples I've seen 20:49 < deen> Oh, Nim mentioned in #teeworlds 20:49 < BotoX> actually has structure in it lol 20:50 < heinrich5991> deen: do you have a highlight on Nim? :) 20:51 < deen> heinrich5991: nope, just randomly read through the chat and noticed 20:51 <@minus> type Answer = enum aYes, aNo ← nope. 20:51 < heinrich5991> what's that? nim? 20:51 <@minus> yes 20:52 < heinrich5991> that does seem quite succint 20:52 < deen> minus: type Answer {.pure.} = enum Yes, No 20:52 <@minus> BotoX: that Task() call in the constructors looks like a neat trick, i'll copy that~ then again, can't wait for startup/init/connect to finish 20:52 <@minus> deen: Answer.Yes then? 20:53 < BotoX> hmmm, startup/init/connect? 20:53 < deen> right 20:53 <@minus> neat 20:53 < heinrich5991> I don't like the C behaviour there, would have preferred the namespaced one to be the default 20:54 < deen> Not sure if you're aware, but I do have a Nim blog: http://hookrace.net/blog/what-is-special-about-nim/ 20:56 <@minus> BotoX: when you create some object and have it connect somewhere, and need to wait for that outside 20:56 <@minus> e.g. DB connection 20:57 < BotoX> isn't that like yield from 20:57 <@minus> yeah, but can't do that on constructors 20:57 < BotoX> or I guess that's more integrated then 20:57 <@minus> so you need aother method to connect 20:57 <@minus> if you do that, it's not in that code you linked 21:01 * matricks is done waxing his new gloves 21:01 <@matricks> bring it on you freakin' winter! 21:01 < BotoX> >winter 21:02 <@minus> matricks: you weren't at ikea today, were you? 21:02 < BotoX> .w 21:02 < BotoX> oh this is not rizon 21:02 <@minus> no internets here 21:02 <@matricks> minus: took a stab at it, but didn't stay long 21:09 < JesseH> Anyone else on linux, using 0.6 and getting seemingly periodic fps decreases? Ever minute or so characters in game will begin to teleport around, and it will last a few seconds. 21:10 < JesseH> [55c8f63e][client]: version 0.6 626fce9a778df4d4 21:10 < JesseH> I will try the latest. I don't know if the one in the buntu apt repo is. 21:17 < BotoX> never had it happen on arch 21:18 < LittleWhite> I would consider to check CPU usage / close as much as possible apps, check IO usage too 21:18 < BotoX> >apps ( ͡° ͜ʖ ͡°) 21:19 < BotoX> pls stop 21:19 < BotoX> it hurts 21:19 < LittleWhite> true :D 21:19 < LittleWhite> it was just quicker 21:33 <@matricks> BotoX: ? 21:33 <@matricks> BotoX: apps was a word long before mobile stuff 21:34 < LittleWhite> softs :D 22:14 <@matricks> heinrich5991: btw, what are you doing with rust and tw?