Home freenode/#xmonad: Logs Calendar

Logs: freenode/#xmonad

←Prev  Next→
Page 1 .. 342 343 344 345 346 347 348 349 350 351 352 .. 397
39,606 events total
2021-05-01 13:23:01 <geekosaur> it'll break and there is no fix (you can't do this reliably even in C)
2021-05-01 13:23:26 <mc47> TIL (again) that I shouldn't slap flags willy-nilly without knowing what they do
2021-05-01 13:23:38 <mc47> alrighty then, thanks!
2021-05-01 13:23:39 <Solid> not using that will apparently also stop breaking the prompt
2021-05-01 13:23:43 <Solid> so win-win :>
2021-05-01 13:23:46 <mc47> that too
2021-05-01 13:25:38 <oogeek> mc47: So is the xmobar issued you mentioned caused by this?
2021-05-01 13:25:40 <geekosaur> I think what's happening is it hits the -N limit in the child because it doesn't know all the child threads vanished on fork()
2021-05-01 13:26:11 <geekosaur> so it's not actually the OS returning EAGAIN but the RTS's own limiting
2021-05-01 13:26:45 <geekosaur> (the broken part being that one can't know what resources those other threads had e.g. locked, to unlock them in the child)
2021-05-01 13:26:55 <Liskni_si> uh, is there some other mechanism to fork+exec that works with -N or does GHC really not support launching processes with -N?
2021-05-01 13:27:23 <geekosaur> Unix doesn't support it. Read what I just wrote
2021-05-01 13:28:21 <geekosaur> when you fork(), all threads go away. but whatever they had locked or etc. is still locked, and you can't know what was locked to unlock it.
2021-05-01 13:28:44 <Liskni_si> geekosaur: yeah but none of that is really an issue if you're going to exec immediately
2021-05-01 13:28:51 <geekosaur> if you exec() immediately this usually isn't a problem, unless the exec fails and then you hit one of the locks trying to tell the user
2021-05-01 13:29:12 <Liskni_si> you aren't supposed to tell the user in the child process anyway
2021-05-01 13:29:22 <Liskni_si> you either exec or _exit
2021-05-01 13:31:09 <geekosaur> but then you can't reliably tell the user why, only the child has that information
2021-05-01 13:33:12 <geekosaur> you can't use the exit code to pass it up unless (a) errnos are guaranteed < 128 (b) you somehow keep track of time or etc. so you know the difference between "child exited on failed exec" vs. "child exited after exec"
2021-05-01 13:33:32 <geekosaur> this stuff is hairy :(
2021-05-01 13:33:45 <mc47> geekosaur do you have a good resource to read about these things? it seems really complicated, and really interesting
2021-05-01 13:33:57 <geekosaur> @where apue
2021-05-01 13:33:58 <lambdabot> I know nothing about apue.
2021-05-01 13:34:01 <geekosaur> bah
2021-05-01 13:34:24 <Liskni_si> seems like System.Process deals with it by having the fork in C
2021-05-01 13:34:34 <mc47> geekosaur got it! Thanks
2021-05-01 13:34:43 <geekosaur> https://www.amazon.com/Advanced-Programming-UNIX-Environment-3rd/dp/0321637739
2021-05-01 13:35:24 <Liskni_si> mc47: I learned most of what I know from man and the texinfo shipped with glibc
2021-05-01 13:35:55 <Liskni_si> (and years of trial and error :-/)
2021-05-01 13:37:13 <mc47> it does seem like something that requires a lot of trial and error :)
2021-05-01 13:37:21 <Liskni_si> mc47: anyway, why did you use -with-rtsopts=-N then?
2021-05-01 13:37:36 <mc47> umm, I don't remember
2021-05-01 13:37:57 <geekosaur> I wouldn;t recommend multiple threads with X11 anyway, it doesn't handle threads well. which may be why the Submaps issue
2021-05-01 13:38:16 × kelnoky quits (~shao@ip1f128ba7.dynamic.kabel-deutschland.de) (Quit: WeeChat 3.1)
2021-05-01 13:38:31 <mc47> well, it probably went something like this "I know close to nothing about cabal -> Oh cool, this is a template -> oh cool, xmonad works now, let's move on"
2021-05-01 13:38:52 <mc47> geekosaur the submaps issue is solved after removing the flags
2021-05-01 13:38:59 <geekosaur> yes
2021-05-01 13:39:11 <oogeek> mc47: So you can close that issue
2021-05-01 13:40:14 <oogeek> About submaps, iirc
2021-05-01 13:40:37 <geekosaur> at minimum you'd want to document it
2021-05-01 13:40:47 <mc47> oogeek I'll leave it open for now, if anyone wants to dig around and understand what's happening, and maybe as a reference
2021-05-01 13:40:51 <Liskni_si> geekosaur: is that really an issue though? would Haskell's type system even let you run X code in another thread?
2021-05-01 13:41:08 <Liskni_si> I mean, obviously it would if you really tried
2021-05-01 13:41:15 <Liskni_si> but it won't happen by accident
2021-05-01 13:41:29 <Liskni_si> you can't fork and then still have the X monad
2021-05-01 13:41:31 <geekosaur> also we want to see if -threaded with -N 1 is safe (although Liskni_si seems to have that config?) because the threaded runtime is more reliable
2021-05-01 13:42:30 <Liskni_si> (also worth mentioning that xmobar actually uses threads and X11, but it means Xlib needs to be told very early to be thread-aware and use locks everywhere, and it possibly adds overhead)
2021-05-01 13:42:31 <geekosaur> you could get the Display out of it first, though
2021-05-01 13:42:51 <geekosaur> and in fact copy the X monad, you'd just be working with your own private copy of it afterward
2021-05-01 13:42:55 <Liskni_si> yeah if you grab the Display, fork and then issue X11 calls in IO, then you're fucked, yeah
2021-05-01 13:43:56 <geekosaur> the interesting part is I didn't think Submaps even used threads, so it shouldn't care
2021-05-01 13:46:24 <Liskni_si> mc47: if you can reliably (or even in 1 out of 5 tried) reproduce the "failed to create OS thread: Resource temporarily unavailable" issue, it might be worth trying to reproduce it under strace -f, and check if it's really EAGAIN from the clone syscall or something
2021-05-01 13:46:37 <Liskni_si> that might help move https://github.com/haskell/unix/issues/62 forward ;-)
2021-05-01 13:47:21 <mc47> sure, how would I do it under strace though?
2021-05-01 13:48:00 <Liskni_si> you'd bind restarting xmobars to a key so that you don't have to restart xmonad again and again
2021-05-01 13:48:14 <Liskni_si> and then you'd strace -f -p <xmonad pid> -o /tmp/trace1
2021-05-01 13:48:27 <Liskni_si> and then you'd hit the keybinding again and again
2021-05-01 13:48:39 <Liskni_si> perhaps restarting the strace every time it doesn't fail to avoid all the noise
2021-05-01 13:49:55 <mc47> alright, I'll hopefuly get to it soon-ish
2021-05-01 13:50:21 <charpointer> where is withEasySB from?
2021-05-01 13:50:27 <charpointer> oogeek
2021-05-01 13:50:52 <Liskni_si> mc47: yeah no pressure, just thought it'd be nice as you seem to be one of a few who have a reproducer :-)
2021-05-01 13:51:42 <mc47> charpointer you'd need the git version for that. I believe there are a lot of comments that tell you what to do if you're not on it
2021-05-01 13:51:48 <oogeek> charpointer: it comes from XMonad.Hooks.StatusBar from the git version of xmonad-contrib
2021-05-01 13:51:50 <mc47> Liskni_si yeah definitely!
2021-05-01 13:52:18 <charpointer> ok, well where do i import this from then
2021-05-01 13:52:19 <charpointer> statusBar
2021-05-01 13:54:13 <oogeek> Liskni_si: I am also curious to know how to only restart xmobar. Can you provide any hints? Sorry that I am a bit dumb.
2021-05-01 13:56:37 <mc47> oogeek just call the function that restarts them, which isn't exported ATM, but that's fine
2021-05-01 13:57:19 <oogeek> mc47: You mean the function from X.H.StatusBar?
2021-05-01 13:57:26 <mc47> yeah
2021-05-01 13:57:48 <oogeek> Thanks, let me read the source code again.
2021-05-01 13:58:22 <mc47> it's updateSBs is what you want to look at
2021-05-01 13:58:55 <mc47> s/it's/
2021-05-01 13:59:50 <mc47> that and killAllStatusBars
2021-05-01 14:02:53 <oogeek> Thanks a lot.
2021-05-01 14:03:16 × charpointer quits (~char@cpc160245-nrth4-2-0-cust907.8-4.cable.virginm.net) (Remote host closed the connection)
2021-05-01 14:13:46 charpointer joins (~char@cpc160245-nrth4-2-0-cust907.8-4.cable.virginm.net)
2021-05-01 14:14:01 <charpointer> ok, so ive setup xmobar and everything works apart from the workspaces which keep saying Updating..
2021-05-01 14:14:09 <charpointer> any ideas what i did wrong?
2021-05-01 14:14:11 <charpointer> oogeek
2021-05-01 14:14:43 <oogeek> Please post your config: xmonad.hs and xmobarrc
2021-05-01 14:14:50 <charpointer> where to?
2021-05-01 14:14:58 <oogeek> pastebin or something else
2021-05-01 14:15:02 <charpointer> ok
2021-05-01 14:16:01 <charpointer> xmonad hs - https://pastebin.com/D2FyyhLZ
2021-05-01 14:17:11 <charpointer> https://pastebin.com/11V3BYFW
2021-05-01 14:17:13 <charpointer> xmobar rc
2021-05-01 14:18:33 × charpointer quits (~char@cpc160245-nrth4-2-0-cust907.8-4.cable.virginm.net) (Remote host closed the connection)
2021-05-01 14:19:51 charpointer joins (~char@cpc160245-nrth4-2-0-cust907.8-4.cable.virginm.net)
2021-05-01 14:20:05 <oogeek> charpointer I find the issue. Wait a few sec, let me paste something.
2021-05-01 14:20:10 <charpointer> okay
2021-05-01 14:20:35 <oogeek> Actually I just finished a Pull Request on multiple monitor example with statusbar, haha
2021-05-01 14:21:02 <charpointer> the bar doesnt need to be on both monitors
2021-05-01 14:21:10 <charpointer> in fact i prefer it not to be
2021-05-01 14:21:17 <charpointer> but idk why my thing says updating constantly
2021-05-01 14:22:00 <oogeek> charpointer: First make it clear, how many bars do you want?
2021-05-01 14:22:05 <charpointer> 1
2021-05-01 14:22:26 <oogeek> Ok, I will give an example that is easy to expand to 2,... in the future.
2021-05-01 14:22:33 <charpointer> ok
←Prev  Next→
Page 1 .. 342 343 344 345 346 347 348 349 350 351 352 .. 397

All times are in UTC.