Home liberachat/#xmonad: Logs Calendar

Logs on 2022-07-21 (liberachat/#xmonad)

00:39:52 × kaskal- quits (~kaskal@089144220061.atnat0029.highway.webapn.at) (Quit: ZNC - https://znc.in)
00:41:20 kaskal joins (~kaskal@2001:4bb8:2c0:3963:7278:d0d4:9479:4919)
01:16:58 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Read error: Connection reset by peer)
01:25:42 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
01:30:30 steve__ joins (~steve@ool-182c2b80.dyn.optonline.net)
01:33:27 × mvk quits (~mvk@2607:fea8:5ce3:8500::909a) (Ping timeout: 272 seconds)
01:53:34 mvk joins (~mvk@2607:fea8:5ce3:8500::909a)
02:04:48 × banc quits (banc@gateway/vpn/airvpn/banc) (Ping timeout: 268 seconds)
02:23:06 banc joins (banc@gateway/vpn/airvpn/banc)
02:48:23 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
02:50:51 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
02:54:35 × td_ quits (~td@muedsl-82-207-238-080.citykom.de) (Ping timeout: 260 seconds)
02:56:21 td_ joins (~td@muedsl-82-207-238-040.citykom.de)
03:05:51 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
03:24:58 × mvk quits (~mvk@2607:fea8:5ce3:8500::909a) (Ping timeout: 240 seconds)
04:11:50 × steve__ quits (~steve@ool-182c2b80.dyn.optonline.net) (Ping timeout: 268 seconds)
06:21:59 dschrempf joins (~dominik@2a01-036d-0118-b0ba-e5e0-6cbe-f350-bd2b.pool6.digikabel.hu)
06:24:08 chomwitt joins (~chomwitt@2a02:587:dc00:5a00:57c7:596d:8744:7d7c)
06:39:59 × dschrempf quits (~dominik@2a01-036d-0118-b0ba-e5e0-6cbe-f350-bd2b.pool6.digikabel.hu) (Quit: WeeChat 3.6)
06:44:01 steve__ joins (~steve@ool-182c2b80.dyn.optonline.net)
07:13:21 alternateved joins (~user@staticline-31-183-144-54.toya.net.pl)
07:29:55 cfricke joins (~cfricke@user/cfricke)
08:11:13 dschrempf joins (~dominik@2a01-036d-0118-b0ba-4d3d-ba11-3857-5d63.pool6.digikabel.hu)
08:51:29 × alternateved quits (~user@staticline-31-183-144-54.toya.net.pl) (Remote host closed the connection)
09:04:40 × Ocelot quits (~ocelot@50-78-208-189-static.hfc.comcastbusiness.net) (Quit: Leaving)
09:26:39 aliosablack joins (~chomwitt@2a02:587:dc00:5a00:57c7:596d:8744:7d7c)
09:29:02 × chomwitt quits (~chomwitt@2a02:587:dc00:5a00:57c7:596d:8744:7d7c) (Ping timeout: 255 seconds)
10:04:55 alternateved joins (~user@staticline-31-183-144-54.toya.net.pl)
10:12:47 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 272 seconds)
10:17:02 × benemorius quits (~benemoriu@2001:470:4bb0:919::1:56) (Ping timeout: 272 seconds)
10:23:00 cfricke joins (~cfricke@user/cfricke)
10:23:22 benemorius joins (~benemoriu@rrcs-24-153-227-174.sw.biz.rr.com)
10:33:50 × benemorius quits (~benemoriu@rrcs-24-153-227-174.sw.biz.rr.com) (Ping timeout: 255 seconds)
10:41:06 benemorius joins (~benemoriu@2001:470:4bb0:919::1:56)
10:58:27 × dschrempf quits (~dominik@2a01-036d-0118-b0ba-4d3d-ba11-3857-5d63.pool6.digikabel.hu) (Ping timeout: 244 seconds)
11:55:23 × hexo_ quits (~hexo@2a02-ab04-2843-9500-c503-ec78-dbed-e319.dynamic.v6.chello.sk) (Ping timeout: 272 seconds)
11:55:45 hexo_ joins (~hexo@188-167-252-189.dynamic.chello.sk)
12:01:53 dschrempf joins (~dominik@2a01-036d-0118-b0ba-3e27-23b2-a101-5a33.pool6.digikabel.hu)
12:19:48 mc47 joins (~mc47@xmonad/TheMC47)
12:19:58 × dschrempf quits (~dominik@2a01-036d-0118-b0ba-3e27-23b2-a101-5a33.pool6.digikabel.hu) (Ping timeout: 240 seconds)
13:10:50 × aliosablack quits (~chomwitt@2a02:587:dc00:5a00:57c7:596d:8744:7d7c) (Ping timeout: 240 seconds)
13:24:39 scardina1 joins (~supreme@customer-212-237-101-39.ip4.gigabit.dk)
13:26:44 × scardinal quits (~supreme@customer-212-237-101-39.ip4.gigabit.dk) (Ping timeout: 244 seconds)
13:44:50 scardina1 is now known as scardinal
14:09:24 benin0 joins (~benin@183.82.24.82)
14:18:31 dschrempf joins (~dominik@2a01-036d-0118-b0ba-f6ba-82af-30e2-2b10.pool6.digikabel.hu)
14:22:46 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 272 seconds)
14:25:06 benin00 joins (~benin@183.82.24.116)
14:27:16 × benin0 quits (~benin@183.82.24.82) (Ping timeout: 268 seconds)
14:27:17 benin00 is now known as benin0
14:37:57 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
15:12:42 × Hash quits (~Hash@tunnel686959-pt.tunnel.tserv15.lax1.ipv6.he.net) (Quit: ZNC - https://znc.in)
15:16:48 Hash joins (~Hash@tunnel686959-pt.tunnel.tserv15.lax1.ipv6.he.net)
15:21:50 × dschrempf quits (~dominik@2a01-036d-0118-b0ba-f6ba-82af-30e2-2b10.pool6.digikabel.hu) (Ping timeout: 255 seconds)
15:39:37 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
15:44:11 <valarMorghulis[m> Is there a way to get current workspace name in xmonad.hs
15:44:27 <valarMorghulis[m> Using StackSet or something
15:46:41 <geekosaur> gets (W.currentTag . windowset)
15:46:56 <geekosaur> (import qualified XMonad.StackSet as W)
15:51:52 the-third-realm[ joins (~the-third@2001:470:69fc:105::1:c326)
15:55:05 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
16:07:02 aliosablack joins (~chomwitt@2a02:587:dc00:5a00:73ad:509c:ee84:62f2)
16:16:21 <valarMorghulis[m> I wanted to have different windoe spawn for different workspaces, therefore i implemented this function... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/74edaa493bd55c785ef35427a8993635e6534b7c)
16:18:23 <geekosaur> don't you want `elem "Code"`?
16:18:33 <geekosaur> I don't see why you would wrap it in another list
16:20:25 <geekosaur> (also I wonder if you actually want `isInfixOf`, looking at that code)
16:20:40 <geekosaur> @index isInfixOf
16:20:40 <lambdabot> GHC.OldList, Data.List, Data.ByteString, Data.ByteString.Char8, Distribution.Simple.Utils
16:23:50 <valarMorghulis[m> <geekosaur> "I don't see why you would wrap..." <- I want to pass a list of workspace names and check if the current workspace is in that list
16:24:01 <valarMorghulis[m> Thats the reason I used list
16:25:18 × benin0 quits (~benin@183.82.24.116) (Quit: The Lounge - https://thelounge.chat)
16:26:34 <geekosaur> ah. so you need to use flip somewhere, or rephrase the `elem` as a right-applied section
16:29:20 <valarMorghulis[m> You mean like this? `<+> manageWorkspace ( ["Code"] 'elem' ) (insertPosition End Newer) (insertPosition Master Newer)`
16:29:58 <geekosaur> with the other quotes, but ["Code"] needs to be on the right (it's the second / right parameter of `elem`)
16:31:17 <geekosaur> ``` (`elem` ["Code"]) ``` or `flip elem ["Code"]`
16:42:46 Digit joins (~user@user/digit)
16:44:08 <valarMorghulis[m> Even hard coding it to the fn doesn't work... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/024270325c6041811cfc54568038dfaa61794ff3)
16:44:31 <valarMorghulis[m> <geekosaur> "gets (W.currentTag . windowset)" <- Does this return a string?
16:49:05 <geekosaur> yes
16:49:46 <geekosaur> elem there needs to be in backticks since it's a function used as infix
16:50:31 <geekosaur> > "abc" `elem` ["abc", "fgh", "wxz"]
16:50:32 <lambdabot> True
16:50:53 <geekosaur> hm, matrix might not render that
16:53:00 <geekosaur> https://play-haskell.tomsmeding.com/play/paste/I1hwYjId/1
16:53:24 <geekosaur> sadly I can't use xmonad functions in the playground
16:56:47 <geekosaur> oh, that paste is mangled, presumably also by matrix
16:57:01 <geekosaur> there are downsides to matrix trying to be fancy
17:00:47 <geekosaur> sigh, I need to edit my update script to build the ghci libs as well, so I don't have to wait for it when I `cabal repl` 😕
17:03:05 <geekosaur> oh, how are you getting `i` there? it needs to be in the X monad and I hope it's not failing that and using list instead
17:03:29 <geekosaur> gets $ W.currentTag . windowset
17:03:30 <geekosaur> :: MonadState XState m => m WorkspaceId
17:05:06 <geekosaur> hm, except that should also fail to typecheck because it won't have MonadState
17:16:57 jao joins (~jao@92.233.85.247)
17:21:14 × aliosablack quits (~chomwitt@2a02:587:dc00:5a00:73ad:509c:ee84:62f2) (Ping timeout: 268 seconds)
17:22:11 <valarMorghulis[m> <geekosaur> "> "abc" `elem` ["abc", "fgh", "..." <- It's in backticks, but it's not visible in here due to the highlighting
17:23:27 <valarMorghulis[m> `elem i ["code", "term"]` doesn't work either
17:23:38 <valarMorghulis[m> Gives the same error
17:24:24 <geekosaur> can you show a bit more code so I can see where `i` is coming from more directly?
17:24:43 <valarMorghulis[m> <geekosaur> "oh, how are you getting `i..." <- Ooh
17:24:49 <geekosaur> right, your original paste shows `where i = gets …
17:24:51 <valarMorghulis[m> geekosaur: Okay
17:25:10 <geekosaur> that won't work, it needs to be inside a `do` and use `<-` (or use (>>=))
17:25:53 <valarMorghulis[m> geekosaur: ```... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/3fa378fc3055b882177cb3f9b5417f567336a1e6)
17:26:16 <valarMorghulis[m> geekosaur: Oo I see
17:26:17 <geekosaur> but I'd have expected that to throw a different error because it needs `MonadState XState` and a list won't have that
17:26:47 <geekosaur> so this needs to be in X, not pure
17:27:11 <geekosaur> and if that causes you issues in a `manageHook` then you need to look into `liftX`
17:29:08 <valarMorghulis[m> geekosaur: Is this what you meant?
17:29:10 <valarMorghulis[m> manageWorkspace :: (WorkspaceId -> Bool) -> ManageHook -> ManageHook -> ManageHook... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/d84829d5b2a9d699c86b334ba762793375f8463f)
17:29:29 <geekosaur> still wrong
17:31:29 <valarMorghulis[m> Ok, ig this is beyond my scope
17:34:25 <geekosaur> https://paste.tomsmeding.com/Z1OklRzk
17:35:08 <geekosaur> which I just typechecked locally and it's valid
17:47:07 <geekosaur> presuming you've been introduced to monads, `ManageHook` is `Query Bool` and `Query a` is `ReaderT Window X a`
17:48:00 <geekosaur> (`liftX` isn't strictly necessary but helps reduce oddball error messages; `lift` would work just as well)
17:48:22 Digit attempts issue openbox's Restart with command xmonad, ... faking confidence it will work, and that he'll restore his dustry fledgling haskell-fu to be able to have xmonad.hs offer keybinds to switch to both openbox and herbstluftwm ... ~ blahblahprocrastinating on pushing the button to find out if i remain here, or am restarting my wm session...
17:49:20 <geekosaur> I'd consider it a bug if a Restart action crashed your session (unless something was seriously wrong with your xmonad config)
17:49:59 <Digit> woot! still here. that worked. :) now i'm back in xmonad! mmmm. it's been years. good sign i'm mending well, getting back to xmonad. :)
17:50:18 <geekosaur> and you can, if you want to switch window managers in xmonad, use `restart "otherWindowManager" False`
17:50:46 <geekosaur> (`True` would attempt to pass it state, but non-xmonad won't understand that state)
19:00:57 × alternateved quits (~user@staticline-31-183-144-54.toya.net.pl) (Remote host closed the connection)
19:07:18 × ml| quits (~ml|@user/ml/x-5298235) (Ping timeout: 240 seconds)
19:21:45 ml| joins (~ml|@user/ml/x-5298235)
19:23:41 <valarMorghulis[m> <geekosaur> "https://paste.tomsmeding.com/..." <- Thank you soo much for taking your time out for helping me
19:23:48 <valarMorghulis[m> It does work now
19:24:30 <valarMorghulis[m> <geekosaur> "presuming you've been introduced..." <- I've a fair bit of knowledge about monads, but this is kinda going over my head now
19:25:31 <valarMorghulis[m> `Just` looks pretty complicated to me
19:25:31 <valarMorghulis[m> I've just started haskell 2 months ago. Hope I'll get better at this soon
19:25:41 <geekosaur> about monads, or about IO? you need a little more for a monad stack (and this is arguably a double stack, but that shouldn't matter too much)
19:28:13 <valarMorghulis[m> And the code I wrote with `where` looks really similar to this, I don't get how these are dif, but it works
19:29:00 <geekosaur> <- does something different from =
19:29:35 <geekosaur> specifically it uses `>>=` to run an action and bind its result
19:30:00 <valarMorghulis[m> geekosaur: Aah ya, until now I didnt bother worrying about it cz they worked almost same, I gotta check more on these
19:30:26 <geekosaur> if you haven't discovered >>= or <- then you haven't really worked with monads
19:30:36 <geekosaur> @where iotut
19:30:36 <lambdabot> https://www.vex.net/~trebla/haskell/IO.xhtml
19:30:54 <geekosaur> with a few changes this is also applicable to xmonad and X in place of IO
19:31:03 <geekosaur> (and Query in place of X)
19:31:13 <valarMorghulis[m> geekosaur: I've worked with >>= but don't underatnd it fully
19:31:23 <geekosaur> oh also I misspoke earlier, ManageHook is Query (Endo WindowSet)
19:31:44 <valarMorghulis[m> And I've used <- this a lot, but I used it as = in a do block
19:31:49 <valarMorghulis[m> I've been doing things wrong
19:31:50 <valarMorghulis[m> I see
19:31:57 <geekosaur> it's more complicated than =
19:32:32 <geekosaur> you can still do let … = in a do block, for pure stuff. but non-pure stuff (running actions) needs <-
19:33:46 <valarMorghulis[m> I see, ig I'll start going through a guide to get my basics in haskell strong
19:58:47 aliosablack joins (~chomwitt@2a02:587:dc00:5a00:df58:8e7a:3d48:e2d2)
20:51:21 × aliosablack quits (~chomwitt@2a02:587:dc00:5a00:df58:8e7a:3d48:e2d2) (Ping timeout: 276 seconds)
21:31:49 × Digit quits (~user@user/digit) (Remote host closed the connection)
23:38:14 Digit joins (~user@user/digit)
23:59:41 mvk joins (~mvk@2607:fea8:5ce3:8500::909a)

All times are in UTC on 2022-07-21.